Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,11 @@ yarn-error.log*
package.json.lock
_push.sh
_build.sh
.yarn
.yarn

# IntelliJ
.idea

# Eclipse
.project

172 changes: 139 additions & 33 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {themes} = require('prism-react-renderer');
const lightTheme = themes.github;
const darkTheme = themes.dracula;

/** @type {import('@docusaurus/types').Config} */
const config = {
Expand All @@ -15,7 +16,7 @@ const config = {

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'Deloitte', // Usually your GitHub org/user name.
organizationName: 'FDA', // Usually your GitHub org/user name.
projectName: 'ikm-dev-doc', // Usually your repo name.
deploymentBranch: 'gh-pages', // Branch to deploy to

Expand Down Expand Up @@ -56,13 +57,13 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
algolia: {
// Replace with your actual Algolia application ID
appId: '1YGVGN70K0',
apiKey: '2d097ea5ed82ed5c6c4e246a59b2f984',
// Replace with your actual index name from Algolia
indexName: 'ikm',
},
// algolia: {
// // Replace with your actual Algolia application ID
// appId: '1YGVGN70K0',
// apiKey: '2d097ea5ed82ed5c6c4e246a59b2f984',
// // Replace with your actual index name from Algolia
// indexName: 'ikm',
// },
navbar: {
title: 'IKM',
logo: {
Expand All @@ -79,22 +80,22 @@ const config = {
{label: 'Komet Tool', to: '/about/komet'}
],
},

{
type: 'dropdown',
label: 'Install',
position: 'left',
items: [
// {
// label: 'Install Komet',
// to: '/install/app',
// to: '/install/app',
// },
{
label: 'Komet User Guide',
to: '/install/guide',
to: '/install/guide',
},
]

},
{
type: 'dropdown',
Expand All @@ -107,11 +108,11 @@ const config = {
},
{
label: 'Developers',
to: '/community/developers',
to: '/community/developers',
},
{
label: 'Informaticists',
to: '/community/informaticists',
to: '/community/informaticists',
},
{
label: 'Code of Conduct',
Expand All @@ -130,11 +131,11 @@ const config = {
},
{
label: 'Additional Documents',
to: '/docs/additional',
to: '/docs/additional',
},
{
label: 'FAQ',
to: '/faq',
to: '/faq',
},
],
},
Expand All @@ -159,11 +160,11 @@ const config = {
items: [
{
label: 'Integrated Knowledge Management',
to: '/about/ikm',
to: '/about/ikm',
},
{
label: 'Komet Tool',
to: '/about/komet',
to: '/about/komet',
},
],
},
Expand All @@ -172,11 +173,11 @@ const config = {
items: [
// {
// label: 'Install Komet',
// to: '/install/app',
// to: '/install/app',
// },
{
label: 'Komet User Guide',
to: '/install/guide',
to: '/install/guide',
},
],
},
Expand All @@ -185,24 +186,24 @@ const config = {
items: [
{
label: 'Get Started',
to: '/community/getstarted',
to: '/community/getstarted',
},
{
label: 'Developers',
to: '/community/developers',
to: '/community/developers',
},
{
label: 'Informaticists',
to: '/community/informaticists',
label: 'Informaticists',
to: '/community/informaticists',
},
{
label: 'Code of Conduct',
to: '/codeofconduct',
},

],
},

{
title: 'Resource Library',
items: [
Expand All @@ -212,11 +213,11 @@ const config = {
},
{
label: 'Additional Documents',
to: '/docs/additional',
to: '/docs/additional',
},
{
label: 'FAQ',
to: '/faq',
to: '/faq',
},
],
},
Expand All @@ -232,12 +233,117 @@ const config = {
],
copyright: `Copyright © ${new Date().getFullYear()}`,
},

prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: lightTheme,
darkTheme: darkTheme,
},
}),

plugins: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
// Search Local Options
// Please see https://github.com/easyops-cn/docusaurus-search-local for changes

// Whether to index docs.
indexDocs: false,

// Whether to index blog.
indexBlog: false,

// Whether to index pages.
indexPages: true,

// Base route path(s) of docs. Slash at beginning is not required. Note: for docs-only mode, this needs to
// be the same as routeBasePath in your @docusaurus/preset-classic config e.g., "/".
docsRouteBasePath: "/docs",

// Base route path(s) of blog. Slash at beginning is not required.
blogRouteBasePath: "/blog",

// All lunr-languages supported languages, + zh
language: "en",

// Whether to add a hashed query when fetching index (based on the content hash of all indexed *.md
// in docsDir and blogDir if applicable). Setting to "filename" will save hash in filename instead of query.
hashed: true,

// The dir(s) of docs to get the content hash, it's relative to the dir of your project.
docsDir: "docs",

// Just like the docsDir but applied to blog.
blogDir: "blog",

// Sometimes people want to keep the stop words as indexed, since they maybe are relevant in
// programming docs.
removeDefaultStopWordFilter: false,

// Enable this if you want to be able to search for any partial word at the cost of search performance.
removeDefaultStemmer: false,

// Highlight search terms on target page.
highlightSearchTermsOnTargetPage: false,

// Limit the search results.
searchResultLimits: 8,

// Set the max length of characters of each search result to show.
searchResultContextMaxLength: 50,

// Whether an explicit path to a heading should be presented on a suggestion template.
explicitSearchResultPath: false,

// Set the match rules to ignore some routes. Put a string if you want an exact match, or put a regex if
// you want a partial match. Note: without the website base url.
ignoreFiles: [],

// A list of css selectors to ignore when indexing each page.
ignoreCssSelectors: [],

// Whether to enable keyboard shortcut to focus in search bar.
searchBarShortcut: false,

// Whether to show keyboard shortcut hint in search bar. Disable it if you need to hide the hint
// while shortcut is still enabled.
searchBarShortcutHint: false,

// The side of the navbar the search bar should appear on. By default, it will try to autodetect based on
// your docusaurus config according to the docs.
searchBarPosition: "auto",

// When you're using multi-instance of docs, set the docs plugin id which you'd like to check the preferred
// version with, for the search index.
//docsPluginIdForPreferredVersion: "",

// Provide your custom dict for language of zh, see here
//zhUserDict: "",

// Provide the file path to your custom dict for language of zh, E.g.: path.resolve("./src/zh-dict.txt")
//zhUserDictPath: "",

// Provide an list of sub-paths as separate search context, E.g.: ["docs", "community", "legacy/resources"].
// It will create multiple search indexes by these paths.
searchContextByPaths: [],

// Whether to hide the search bar when no search context was matched. By default, if searchContextByPaths
// is set, pages which are not matched with it will be considered as with a search context of ROOT. By
// setting hideSearchBarWithNoSearchContext: true, these pages will be considered as with NO search context,
// and the search bar will be hidden.
hideSearchBarWithNoSearchContext: false,

// Whether to show results from all the contexts if no context is provided. This option should not be
// used with hideSearchBarWithNoSearchContext: true as this would show results when there is no search
// context. This will duplicate indexes and might have a performance cost depending on the index sizes.
useAllContextsWithNoSearchContext: false,

// Force enable search index even if noIndex: true is set, this also affects unlisted articles.
forceIgnoreNoIndex: false,

},
],
],
};

module.exports = config;
Loading