Merge pull request #638 from slumbering/docsearch-api-key
WIP: change algolia api key + remove github auth for deploy preview
This commit is contained in:
commit
36b287c9d5
@ -27,8 +27,8 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
algolia: {
|
algolia: {
|
||||||
apiKey: "66c9f1f7e6ba6617ec4e65194788bacd",
|
apiKey: "b2324f1ac8932ab80916382521473115",
|
||||||
indexName: "docs_dagger",
|
indexName: "daggosaurus",
|
||||||
},
|
},
|
||||||
colorMode: {
|
colorMode: {
|
||||||
// "light" | "dark"
|
// "light" | "dark"
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
--ifm-code-font-size: 100%;
|
--ifm-code-font-size: 100%;
|
||||||
--ifm-code-border-radius: 2rem;
|
--ifm-code-border-radius: 2rem;
|
||||||
--ifm-code-color: var(--ifm-color-primary-light);
|
--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-code-padding-horizontal: 0.2rem;
|
||||||
--ifm-h2-font-size: 2rem;
|
--ifm-h2-font-size: 2rem;
|
||||||
--ifm-menu-color-background-active: var(--ifm-color-primary);
|
--ifm-menu-color-background-active: var(--ifm-color-primary);
|
||||||
|
@ -139,7 +139,9 @@ function DocPage(props) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// CUSTOM DOCPAGE
|
// 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'))) {
|
||||||
const [isUserAuthorized, setIsUserAuthorized] = useState()
|
const [isUserAuthorized, setIsUserAuthorized] = useState()
|
||||||
const [isLoading, setIsLoading] = useState(true)
|
const [isLoading, setIsLoading] = useState(true)
|
||||||
const [redirectState, setRedirectState] = useState()
|
const [redirectState, setRedirectState] = useState()
|
||||||
|
Reference in New Issue
Block a user