Skip to content

Commit

Permalink
Sync config type-checking and shorthands from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine committed Mar 5, 2023
1 parent c8ed13b commit 7803baa
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/** @type {import('@docusaurus/types').DocusaurusConfig} */
// @ts-check

const sb = require('./src/js/sidebars.js')

module.exports = {
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'docs.hackerspace.sg',
tagline: 'All the HackerspaceSG docs!',
url: 'https://docs.hackerspace.sg',
Expand All @@ -12,7 +13,10 @@ module.exports = {
favicon: 'img/favicon.ico',
organizationName: 'hackerspacesg',
projectName: 'docs.hackerspace.sg',
themeConfig: {

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
prism: {
theme: require('prism-react-renderer/themes/github'),
},
Expand Down Expand Up @@ -99,35 +103,39 @@ module.exports = {
],
copyright: `Copyright © ${new Date().getFullYear()} Hackerspace.SG Pte Ltd and contributors.`,
},
},
}),

presets: [
[
'@docusaurus/preset-classic',
{
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
docs: false,
blog: false,
},
}),
],
],
plugins: [
[
'@docusaurus/plugin-content-docs',
{
'content-docs',
/** @type {import('@docusaurus/plugin-content-docs').Options} */
({
id: 'handbook',
path: 'docs/handbook',
editUrl:
'https://github.com/hackerspacesg/docs.hackerspace.sg/blob/main/',
routeBasePath: 'handbook',
sidebarPath: require.resolve('./docs/sidebars.handbook.js'),
showLastUpdateTime: true,
},
}),
],
[
'@docusaurus/plugin-content-docs',
{
'content-docs',
/** @type {import('@docusaurus/plugin-content-docs').Options} */
({
id: 'plenum',
path: 'docs/plenum',
editUrl:
Expand All @@ -142,7 +150,9 @@ module.exports = {
const sidebarItems = await defaultSidebarItemsGenerator(args);
return sb.popUnshiftItems(sb.reverseSidebarItems(sidebarItems));
},
},
}),
],
],
};

module.exports = config;

0 comments on commit 7803baa

Please sign in to comment.