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:
Andrea Luzzardi 2021-06-14 18:47:14 +02:00 committed by GitHub
commit 36b287c9d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

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

View File

@ -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);

View File

@ -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()