mirror of
https://github.com/mfocko/blog.git
synced 2024-11-22 13:03:47 +01:00
chore: do not use presets in config
Allows us to have generated configs for „docs“ for each course. Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
bbf44d1ea9
commit
6a6fef3332
1 changed files with 18 additions and 58 deletions
|
@ -9,6 +9,21 @@ const katex = require("rehype-katex");
|
||||||
|
|
||||||
require("dotenv").config();
|
require("dotenv").config();
|
||||||
|
|
||||||
|
function constructDocs(subject) {
|
||||||
|
return [
|
||||||
|
"@docusaurus/plugin-content-docs",
|
||||||
|
{
|
||||||
|
id: subject,
|
||||||
|
path: subject,
|
||||||
|
routeBasePath: subject,
|
||||||
|
sidebarPath: require.resolve("./sidebars.js"),
|
||||||
|
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
||||||
|
remarkPlugins: [math],
|
||||||
|
rehypePlugins: [katex],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {import('@docusaurus/types').Config} */
|
/** @type {import('@docusaurus/types').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
title: "Additional materials by mf",
|
title: "Additional materials by mf",
|
||||||
|
@ -29,14 +44,7 @@ const config = {
|
||||||
"classic",
|
"classic",
|
||||||
/** @type {import('@docusaurus/preset-classic').Options} */
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
||||||
({
|
({
|
||||||
docs: {
|
docs: false,
|
||||||
path: "ib002",
|
|
||||||
routeBasePath: "ib002",
|
|
||||||
sidebarPath: require.resolve("./sidebars.js"),
|
|
||||||
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
|
||||||
remarkPlugins: [math],
|
|
||||||
rehypePlugins: [katex],
|
|
||||||
},
|
|
||||||
blog: false,
|
blog: false,
|
||||||
theme: {
|
theme: {
|
||||||
customCss: require.resolve("./src/css/custom.css"),
|
customCss: require.resolve("./src/css/custom.css"),
|
||||||
|
@ -45,56 +53,7 @@ const config = {
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
plugins: [
|
plugins: ["ib002", "ib015", "ib110", "pb071", "pb161"].map(constructDocs),
|
||||||
[
|
|
||||||
"@docusaurus/plugin-content-docs",
|
|
||||||
{
|
|
||||||
id: "ib015",
|
|
||||||
path: "ib015",
|
|
||||||
routeBasePath: "ib015",
|
|
||||||
sidebarPath: require.resolve("./sidebars.js"),
|
|
||||||
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
|
||||||
remarkPlugins: [math],
|
|
||||||
rehypePlugins: [katex],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@docusaurus/plugin-content-docs",
|
|
||||||
{
|
|
||||||
id: "ib110",
|
|
||||||
path: "ib110",
|
|
||||||
routeBasePath: "ib110",
|
|
||||||
sidebarPath: require.resolve("./sidebars.js"),
|
|
||||||
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
|
||||||
remarkPlugins: [math],
|
|
||||||
rehypePlugins: [katex],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@docusaurus/plugin-content-docs",
|
|
||||||
{
|
|
||||||
id: "pb071",
|
|
||||||
path: "pb071",
|
|
||||||
routeBasePath: "pb071",
|
|
||||||
sidebarPath: require.resolve("./sidebars.js"),
|
|
||||||
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
|
||||||
remarkPlugins: [math],
|
|
||||||
rehypePlugins: [katex],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@docusaurus/plugin-content-docs",
|
|
||||||
{
|
|
||||||
id: "pb161",
|
|
||||||
path: "pb161",
|
|
||||||
routeBasePath: "pb161",
|
|
||||||
sidebarPath: require.resolve("./sidebars.js"),
|
|
||||||
editUrl: "https://gitlab.fi.muni.cz/xfocko/kb/tree/main",
|
|
||||||
remarkPlugins: [math],
|
|
||||||
rehypePlugins: [katex],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
stylesheets: [
|
stylesheets: [
|
||||||
{
|
{
|
||||||
|
@ -115,6 +74,7 @@ const config = {
|
||||||
{
|
{
|
||||||
type: "doc",
|
type: "doc",
|
||||||
docId: "ib002-intro",
|
docId: "ib002-intro",
|
||||||
|
docsPluginId: "ib002",
|
||||||
position: "left",
|
position: "left",
|
||||||
label: "IB002: Algorithms",
|
label: "IB002: Algorithms",
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue