docs: 🐛 change algolia api key + remove github auth for deploy preview

Signed-off-by: slumbering <slumbering.pierrot@gmail.com>
This commit is contained in:
slumbering 2021-06-14 18:20:15 +02:00
parent ffd4187660
commit fb8ac65c66
3 changed files with 6 additions and 4 deletions

View File

@ -27,8 +27,8 @@ module.exports = {
},
},
algolia: {
apiKey: "66c9f1f7e6ba6617ec4e65194788bacd",
indexName: "docs_dagger",
apiKey: "b2324f1ac8932ab80916382521473115",
indexName: "daggosaurus",
},
colorMode: {
// "light" | "dark"

View File

@ -33,7 +33,7 @@
--ifm-code-font-size: 100%;
--ifm-code-border-radius: 2rem;
--ifm-code-color: var(--ifm-color-primary-light);
--ifm-code-padding-vertical: 0.1rem;
--ifm-code-padding-vertical: 0;
--ifm-code-padding-horizontal: 0.2rem;
--ifm-h2-font-size: 2rem;
--ifm-menu-color-background-active: var(--ifm-color-primary);

View File

@ -139,7 +139,9 @@ function DocPage(props) {
);
// CUSTOM DOCPAGE
if (typeof window === "undefined" || (typeof window !== "undefined" && window?.location?.hostname !== "localhost")) {
// Do not use Github authentication when in local env or Netlify deploy preview
if (typeof window === "undefined" ||
(typeof window !== "undefined" && (window?.location?.hostname !== "localhost" || window.location.hostname.includes('deploy-preview')))) {
const [isUserAuthorized, setIsUserAuthorized] = useState()
const [isLoading, setIsLoading] = useState(true)
const [redirectState, setRedirectState] = useState()