2022-11-05 15:24:54 +01:00
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
|
2022-12-14 21:35:59 +01:00
|
|
|
const lightCodeTheme = require("./src/prism-themes/solarizedLight");
|
2022-11-05 15:24:54 +01:00
|
|
|
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
|
|
|
|
|
|
|
|
const math = require("remark-math");
|
|
|
|
const katex = require("rehype-katex");
|
|
|
|
|
|
|
|
require("dotenv").config();
|
|
|
|
|
2022-11-05 23:01:28 +01:00
|
|
|
class Subject {
|
|
|
|
constructor(subject, description) {
|
|
|
|
this.subject = subject;
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
docs() {
|
|
|
|
return [
|
|
|
|
"@docusaurus/plugin-content-docs",
|
|
|
|
{
|
|
|
|
id: this.subject,
|
|
|
|
path: this.subject,
|
|
|
|
routeBasePath: this.subject,
|
|
|
|
sidebarPath: require.resolve("./sidebars.js"),
|
2022-12-18 15:36:09 +01:00
|
|
|
editUrl: "https://gitlab.com/mfocko/kb/tree/main",
|
2022-11-05 23:01:28 +01:00
|
|
|
remarkPlugins: [math],
|
|
|
|
rehypePlugins: [katex],
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
navbar() {
|
|
|
|
return {
|
|
|
|
type: "doc",
|
|
|
|
docId: `${this.subject}-intro`,
|
|
|
|
docsPluginId: this.subject,
|
|
|
|
position: "left",
|
|
|
|
label: `${this.subject.toUpperCase()}: ${this.description}`,
|
|
|
|
};
|
|
|
|
}
|
2022-12-18 15:36:09 +01:00
|
|
|
|
|
|
|
footer() {
|
|
|
|
return {
|
|
|
|
label: `${this.subject.toUpperCase()}: ${this.description}`,
|
|
|
|
to: this.subject,
|
|
|
|
}
|
|
|
|
}
|
2022-11-05 22:43:54 +01:00
|
|
|
}
|
|
|
|
|
2022-11-05 23:01:28 +01:00
|
|
|
const subjects = [
|
2022-12-25 19:10:03 +01:00
|
|
|
new Subject("ib002", "Algorithms"),
|
|
|
|
// new Subject("ib015", "Non-imperative programming"),
|
|
|
|
// new Subject("ib110", "Introduction to informatics"),
|
|
|
|
// new Subject("ib111", "Foundations of programming"),
|
|
|
|
new Subject("pb071", "C"),
|
|
|
|
new Subject("pb161", "C++"),
|
2022-11-05 23:01:28 +01:00
|
|
|
];
|
|
|
|
|
2022-11-05 15:24:54 +01:00
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
2022-12-25 19:10:03 +01:00
|
|
|
title: "mf",
|
|
|
|
tagline: "blog and additional materials for courses at φ",
|
2022-11-05 15:24:54 +01:00
|
|
|
url: process.env.URL,
|
|
|
|
baseUrl: process.env.BASE_URL,
|
|
|
|
onBrokenLinks: "warn",
|
|
|
|
onBrokenMarkdownLinks: "warn",
|
|
|
|
favicon: "img/favicon.ico",
|
|
|
|
|
|
|
|
i18n: {
|
|
|
|
defaultLocale: "en",
|
2022-11-05 23:16:17 +01:00
|
|
|
locales: ["en"],
|
2022-11-05 15:24:54 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"classic",
|
|
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
|
|
({
|
2022-11-05 22:43:54 +01:00
|
|
|
docs: false,
|
2022-11-05 15:24:54 +01:00
|
|
|
blog: false,
|
|
|
|
theme: {
|
|
|
|
customCss: require.resolve("./src/css/custom.css"),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
2022-12-14 21:38:27 +01:00
|
|
|
plugins: [
|
|
|
|
...subjects.map(s => s.docs()),
|
|
|
|
[
|
|
|
|
'@docusaurus/plugin-content-blog',
|
|
|
|
{
|
|
|
|
id: 'blog',
|
|
|
|
routeBasePath: 'blog',
|
|
|
|
path: './blog',
|
|
|
|
feedOptions: {
|
|
|
|
type: 'all',
|
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} Matej Focko.`,
|
|
|
|
},
|
2022-12-18 15:36:09 +01:00
|
|
|
editUrl: "https://gitlab.com/mfocko/kb/tree/main",
|
2022-12-15 01:03:08 +01:00
|
|
|
remarkPlugins: [math],
|
|
|
|
rehypePlugins: [katex],
|
2022-12-14 21:38:27 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2022-11-05 15:24:54 +01:00
|
|
|
|
|
|
|
stylesheets: [
|
|
|
|
{
|
|
|
|
href: "https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css",
|
|
|
|
type: "text/css",
|
|
|
|
integrity:
|
|
|
|
"sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM",
|
|
|
|
crossorigin: "anonymous",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
|
|
|
navbar: {
|
2022-12-25 19:10:03 +01:00
|
|
|
title: "mf",
|
2022-11-05 15:24:54 +01:00
|
|
|
items: [
|
2022-11-05 23:01:28 +01:00
|
|
|
...subjects.map(s => s.navbar()),
|
2022-12-14 21:38:27 +01:00
|
|
|
{
|
|
|
|
to: "blog",
|
|
|
|
position: "right",
|
|
|
|
label: "Blog",
|
|
|
|
},
|
2022-11-05 15:24:54 +01:00
|
|
|
],
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
style: "dark",
|
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} Matej Focko.`,
|
2022-12-18 15:36:09 +01:00
|
|
|
links: [
|
|
|
|
{
|
|
|
|
title: "Additional materials for φ courses",
|
|
|
|
items: subjects.map(s => s.footer()),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Social #1",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "LinkedIn",
|
|
|
|
href: "https://www.linkedin.com/in/mfocko/",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "GitHub",
|
|
|
|
href: "https://github.com/mfocko",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "GitLab",
|
|
|
|
href: "https://gitlab.com/mfocko",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Social #2",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "Twitter",
|
|
|
|
href: "https://twitter.com/m4tt_314",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "Twitch",
|
|
|
|
href: "https://twitch.tv/m4tt_314",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "Ko-fi",
|
|
|
|
href: "https://ko-fi.com/m4tt_314",
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "Source of this web",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "GitLab",
|
|
|
|
href: "https://gitlab.com/mfocko/kb",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "GitLab FI",
|
|
|
|
href: "https://gitlab.fi.muni.cz/xfocko/kb",
|
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2022-11-05 15:24:54 +01:00
|
|
|
},
|
|
|
|
prism: {
|
|
|
|
theme: lightCodeTheme,
|
|
|
|
darkTheme: darkCodeTheme,
|
|
|
|
additionalLanguages: [
|
2022-12-11 21:31:19 +01:00
|
|
|
"ada",
|
2022-12-14 21:35:59 +01:00
|
|
|
"bash",
|
2022-11-05 15:24:54 +01:00
|
|
|
"csharp",
|
|
|
|
"dot",
|
|
|
|
"haskell",
|
2022-12-11 21:31:19 +01:00
|
|
|
"java",
|
|
|
|
"nix",
|
|
|
|
"pascal",
|
|
|
|
"ruby",
|
2022-11-05 15:24:54 +01:00
|
|
|
"rust",
|
|
|
|
],
|
|
|
|
},
|
2022-11-05 23:14:07 +01:00
|
|
|
docs: {
|
|
|
|
sidebar: {
|
|
|
|
hideable: true,
|
|
|
|
}
|
2023-02-04 17:52:16 +01:00
|
|
|
},
|
|
|
|
mermaid: {
|
|
|
|
options: {
|
|
|
|
fontFamily: "Iosevka,'Iosevka Term','Cascadia Code','JetBrains Mono','Fira Code',monospace",
|
|
|
|
},
|
|
|
|
},
|
2022-11-05 15:24:54 +01:00
|
|
|
}),
|
2023-02-04 17:52:16 +01:00
|
|
|
|
|
|
|
markdown: {
|
|
|
|
mermaid: true,
|
|
|
|
},
|
|
|
|
themes: [
|
|
|
|
'@docusaurus/theme-mermaid',
|
|
|
|
],
|
2022-11-05 15:24:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|