diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7e5ef2c..1f3cc7d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -68,35 +68,39 @@ const config: Config = { // disableSwitch: false, // respectPrefersColorScheme: false, }, - // algolia: { - // // The application ID provided by Algolia - // appId: 'YOUR_APP_ID', + algolia: { + // The application ID provided by Algolia + appId: 'CKFAW48CDG', - // // Public API key: it is safe to commit it - // apiKey: 'YOUR_SEARCH_API_KEY', + // Public API key: it is safe to commit it + apiKey: 'adb8f04cf88389128677f5ff758faf9d', - // indexName: 'YOUR_INDEX_NAME', + indexName: 'common-utils-pkg-js-v2', - // // Optional: see doc section below - // contextualSearch: true, + // Optional: see doc section below + contextualSearch: true, - // // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. - // externalUrlRegex: 'external\\.com|domain\\.com', + // Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them. + // externalUrlRegex: 'external\\.com|domain\\.com', - // // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs - // replaceSearchResultPathname: { - // from: '/docs/', // or as RegExp: /\/docs\// - // to: '/', - // }, + // Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs + // replaceSearchResultPathname: { + // from: '/api/', // or as RegExp: /\/docs\// + // to: '/', + // }, - // // Optional: Algolia search parameters - // searchParameters: {}, + // Optional: Algolia search parameters + // searchParameters: {}, - // // Optional: path for search page that enabled by default (`false` to disable it) - // searchPagePath: 'search', + // Optional: path for search page that enabled by default (`false` to disable it) + // searchPagePath: 'search', - // //... other Algolia params - // }, + // Optional: whether the insights feature is enabled or not on Docsearch (`false` by default) + // insights: false, + + // Optional: whether you want to use the new Ask AI feature (undefined by default) + // askAi: 'YOUR_ALGOLIA_ASK_AI_ASSISTANT_ID', + }, navbar: { title: 'Common Utilities Package', logo: { diff --git a/scripts/md-generate.mjs b/scripts/md-generate.mjs index 547ec38..176e107 100644 --- a/scripts/md-generate.mjs +++ b/scripts/md-generate.mjs @@ -24,7 +24,6 @@ const getDirectories = async (source) => .map((dirent) => dirent.name); const methodDirectory = await getDirectories('src/'); -console.log('🍉debuu ~ methodDirectory:', methodDirectory); // generate the _category_.json for docusaurus again // fs.writeFileSync( diff --git a/src-docusaurus/css/custom.css b/src-docusaurus/css/custom.css index 2184ca9..f7d2789 100644 --- a/src-docusaurus/css/custom.css +++ b/src-docusaurus/css/custom.css @@ -33,3 +33,43 @@ img[src*='#center'] { display: block; margin: auto; } + +[data-theme='light'] .DocSearch { + /* --docsearch-primary-color: var(--ifm-color-primary); */ + /* --docsearch-text-color: var(--ifm-font-color-base); */ + --docsearch-muted-color: var(--ifm-color-secondary-darkest); + --docsearch-container-background: rgba(94, 100, 112, 0.7); + /* Modal */ + --docsearch-modal-background: var(--ifm-color-secondary-lighter); + /* Search box */ + --docsearch-searchbox-background: var(--ifm-color-secondary); + --docsearch-searchbox-focus-background: var(--ifm-color-white); + /* Hit */ + --docsearch-hit-color: var(--ifm-font-color-base); + --docsearch-hit-active-color: var(--ifm-color-white); + --docsearch-hit-background: var(--ifm-color-white); + /* Footer */ + --docsearch-footer-background: var(--ifm-color-white); +} + +[data-theme='dark'] .DocSearch { + --docsearch-text-color: var(--ifm-font-color-base); + --docsearch-muted-color: var(--ifm-color-secondary-darkest); + --docsearch-container-background: rgba(47, 55, 69, 0.7); + /* Modal */ + --docsearch-modal-background: var(--ifm-background-color); + /* Search box */ + --docsearch-searchbox-background: var(--ifm-background-color); + --docsearch-searchbox-focus-background: var(--ifm-color-black); + /* Hit */ + --docsearch-hit-color: var(--ifm-font-color-base); + --docsearch-hit-active-color: var(--ifm-color-white); + --docsearch-hit-background: var(--ifm-color-emphasis-100); + /* Footer */ + --docsearch-footer-background: var(--ifm-background-surface-color); + --docsearch-key-gradient: linear-gradient( + -26.5deg, + var(--ifm-color-emphasis-200) 0%, + var(--ifm-color-emphasis-100) 100% + ); +}