feat: Add GitHub Pages workflow (#50)

* feat: Add GitHub Pages workflow
* chore: Switch to GitHub pages
This commit is contained in:
Eric Tuvesson
2024-01-11 10:35:32 +01:00
committed by GitHub
parent 5e89922840
commit 8fcb6600ad
2 changed files with 58 additions and 24 deletions

View File

@@ -1,39 +1,17 @@
// @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 {
_parseNoodlMarkupPlugin,
_parseRenderedMarkupPlugin,
} = require('./plugins/markdown-syntax');
const version = require('./package.json')
.version.split('.')
.slice(0, 2)
.join('.');
// Reverse the sidebar items ordering (including nested category items)
function reverseSidebarItems(items) {
// Reverse items in categories
const result = items.map((item) => {
if (item.type === 'category') {
return { ...item, items: reverseSidebarItems(item.items) };
}
return item;
});
// Reverse items at current level
result.reverse();
return result;
}
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Noodl',
tagline: 'Dinosaurs are cool',
url: 'https://docs.noodl.net',
baseUrl: `/${version}/`,
url: 'https://noodlapp.github.io',
baseUrl: `/noodl-docs/`,
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',