Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
deploy:
uses: ConductionNL/.github/.github/workflows/documentation.yml@main
with:
cname: softwarecatalog.app
cname: softwarecatalog.conduction.nl
165 changes: 90 additions & 75 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
// @ts-check

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Software Catalogus',
tagline: 'Manage your software portfolio with applications, modules, and connections',
url: 'https://softwarecatalog.app',
/**
* SoftwareCatalog documentation site.
*
* Built on @conduction/docusaurus-preset for brand defaults (tokens,
* theme swizzles for Navbar / Footer, four-locale i18n scaffolding,
* KvK / BTW copyright). Site-specific overrides — locales, sidebar
* path, mermaid theme, custom prism themes, softwarecatalog-only
* navbar items — are passed through createConfig() opts.
*/

const { createConfig, baseFooterLinks } = require('@conduction/docusaurus-preset');

/* createConfig replaces themes wholesale when `themes:` is passed, so
we re-include the brand theme plugin alongside @docusaurus/theme-mermaid.
Without the brand theme entry the Navbar/Footer swizzles and
brand.css auto-load would silently drop. */
const BRAND_THEME = require.resolve('@conduction/docusaurus-preset/theme');

const config = createConfig({
title: 'SoftwareCatalog',
tagline: 'IT-asset management on Nextcloud. Software inventory, licenses, contracts, dependencies. One register, every install.',
url: 'https://softwarecatalog.conduction.nl',
baseUrl: '/',

organizationName: 'ConductionNL',
projectName: 'softwarecatalog',
trailingSlash: false,

onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',

/* The brand preset's default i18n block (nl/en/de/fr) is replaced
wholesale here. SoftwareCatalog docs ship with NL + EN translation
surfaces; keep both. */
i18n: {
defaultLocale: 'en',
locales: ['en', 'nl'],
Expand All @@ -23,89 +39,88 @@ const config = {
},
},

/* The softwarecatalog docs source lives at the repo root of `docs/`
rather than under a `docs/` subfolder, so we override the preset's
default `presets:` block to point `docs.path` at './' and disable
the blog plugin. customCss carries softwarecatalog-specific CSS
only — brand tokens and the theme swizzles are auto-loaded by the
brand theme entry in `themes:` below. */
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
path: './',
exclude: ['**/node_modules/**'],
/* docs.path: './' makes plugin-content-docs scan every file
in docs/, which collides with plugin-content-pages's own
scan of docs/src/pages/. Exclude src/ (pages live there)
plus the standard node_modules bucket. */
exclude: ['**/node_modules/**', 'src/**'],
sidebarPath: require.resolve('./sidebars.js'),
editUrl:
'https://github.com/ConductionNL/softwarecatalog/tree/main/docs/',
editUrl: 'https://github.com/ConductionNL/softwarecatalog/tree/main/docs/',
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'Software Catalogus',
logo: {
alt: 'Software Catalogus Logo',
src: 'img/logo.svg',
},
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Documentation',
},
{
href: 'https://github.com/ConductionNL/softwarecatalog',
label: 'GitHub',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Documentation',
to: '/docs/FEATURES',
},
],
},
{
title: 'Community',
items: [
{
label: 'GitHub',
href: 'https://github.com/ConductionNL/softwarecatalog',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} for <a href="https://openwebconcept.nl">Open Webconcept</a> by <a href="https://conduction.nl">Conduction B.V.</a>`,
},
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/dracula'),
themes: [BRAND_THEME, '@docusaurus/theme-mermaid'],

/* Brand navbar provides locale dropdown + GitHub by default; we
replace items[] with softwarecatalog's own (Documentation sidebar
link, GitHub link, locale dropdown). */
navbar: {
items: [
{
type: 'docSidebar',
sidebarId: 'tutorialSidebar',
position: 'left',
label: 'Documentation',
},
mermaid: {
theme: { light: 'default', dark: 'dark' },
{
href: 'https://github.com/ConductionNL/softwarecatalog',
label: 'GitHub',
position: 'right',
},
}),
markdown: {
mermaid: true,
{ type: 'localeDropdown', position: 'right' },
],
},
themes: ['@docusaurus/theme-mermaid'],

/* Per-property footer override (preset 1.2.0+): we pass `links` only,
so the brand `style: 'dark'` and the brand KvK/BTW/IBAN/address
copyright string both inherit unchanged. Single-column brand
"Conduction" anchor pulled from baseFooterLinks(). */
footer: {
links: [
...baseFooterLinks().filter((column) => column.title === 'Conduction'),
],
},

/* Drop the canal-footer's boat-sinking + kade-cyclist mini-games
on this product-page footer (preset 1.3.0+). The static skyline +
canal decoration are kept; the interactive layer goes away. */
minigames: false,

/* themeConfig is shallow-merged into the preset's defaults
(colorMode + navbar + footer). prism + mermaid land alongside. */
themeConfig: {
prism: {
theme: require('prism-react-renderer/themes/github'),
darkTheme: require('prism-react-renderer/themes/dracula'),
},
mermaid: {
theme: { light: 'default', dark: 'dark' },
},
},
});

/* createConfig doesn't pass-through arbitrary top-level fields; assign
markdown directly so it makes it into the final Docusaurus config. */
config.markdown = {
mermaid: true,
};

module.exports = config;
Loading
Loading