cmesh_docs/docusaurus.config.cjs
Ho Sy Tan d2651bb5d1
Some checks failed
CI / Typecheck (push) Has been cancelled
CI / Check prettier (push) Has been cancelled
CI / Test (push) Has been cancelled
2025-04-04 15:39:06
2025-04-04 15:39:06 +07:00

152 lines
4 KiB
JavaScript

// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
// const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('./src/prism-dark.cjs');
const lightCodeTheme = require('./src/prism-light.cjs');
const hq = require('alias-hq');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Manual',
tagline: 'Learn about Cmesh here',
url: 'https://cmesh.ct129.com',
// For deploy previews, don't set a baseUrl
baseUrl: '/manual',
trailingSlash: true,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
onBrokenAnchors: 'throw',
favicon: 'img/favicon.ico',
plugins: [
[
'docusaurus-plugin-module-alias',
{
alias: hq.get('webpack'),
},
],
],
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://git.ct129.com/cmesh/cmesh_docs/tree/main/',
},
theme: {
customCss: [
require.resolve('./src/css/base.css'),
require.resolve('./src/css/theme.css'),
require.resolve('./src/css/utility.css'),
],
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/theme-common').ThemeConfig} */
{
image: 'img/cmesh-docs-og.png',
navbar: {
title: 'Manual',
logo: {
alt: 'Cmesh Website logo',
href: '/docs/',
src: 'img/mark.svg',
srcDark: 'img/mark-dark.svg',
},
items: [
{
href: 'https://cmesh.ct129.com',
label: 'Cmesh Website',
position: 'right',
},
],
},
footer: {
links: [
{
title: 'Docs',
items: [
{
label: 'Guides',
to: '/docs/guides/',
},
{
label: 'Config Reference',
to: '/docs/config/',
},
{
label: 'Manual Git',
href: 'https://git.ct129.com/cmesh/cmesh_docs',
},
],
},
{
title: 'Cmesh',
items: [
{
label: 'Source Code',
href: 'https://git.ct129.com/cmesh/cmesh',
},
{
label: 'CT129',
href: 'https://join.cmesh.com/t/cmeshoss/shared_invite/enQtOTA5MDI4NDg3MTg4LTkwY2EwNTI4NzQyMzc0M2ZlODBjNWI3NTY1MzhiOThiMmZlZjVkMTI0NGY4YTMyNjUwMWEyNzNkZTJmYzQxOGU',
},
],
},
{
title: 'Cmesh Website',
items: [
{
label: 'Home',
href: 'https://cmesh.ct129.com',
},
{
label: 'Support',
href: 'https://cmesh.ct129.com/index.html#pricing',
},
{
label: 'Download',
href: 'https://cmesh.ct129.com/download.html',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Cmesh Website.`,
},
algolia: {
// The application ID provided by Algolia
appId: '3Z2PF7OC67',
// Public Search API key: it is safe to commit it
apiKey: 'e18093227a63ac004263f767e3f5a896',
indexName: 'defined-cmesh',
contextualSearch: false,
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: false,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
},
};
module.exports = config;