tjo.space/docusaurus.config.js
Tine Jozelj a014fe9267
All checks were successful
ci / docker (push) Successful in 4m15s
feat: add status link
2023-09-12 00:34:50 +02:00

145 lines
4.1 KiB
JavaScript

// @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");
/** @type {import('@docusaurus/types').Config} */
const config = {
title: "tjo.space",
tagline: "Your personal space.",
favicon: "img/icon.svg",
// Set the production url of your site here
url: "https://tjo.space",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "tjo-space", // Usually your GitHub org/user name.
projectName: "tjo.space", // Usually your repo name.
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
// Even if you don't use internalization, you can use this field to set useful
// metadata like html lang. For example, if your site is Chinese, you may want
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: "en",
locales: ["en", "sl"],
},
presets: [
[
"classic",
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
"https://code.tjo.space/tjo-space/tjo.space/src/branch/main/",
},
blog: {
showReadingTime: true,
editUrl:
"https://code.tjo.space/tjo-space/tjo.space/src/branch/main/",
feedOptions: {
type: "all",
copyright: `Copyright © ${new Date().getFullYear()} tjo.space.`,
createFeedItems: async (params) => {
const { blogPosts, defaultCreateFeedItems, ...rest } = params;
return defaultCreateFeedItems({
// keep only the 10 most recent blog posts in the feed
blogPosts: blogPosts.filter((_item, index) => index < 10),
...rest,
});
},
},
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
}),
],
],
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
indexDocs: true,
indexBlog: true,
indexPages: true,
language: ["en"], // sl is not supported
},
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: "img/icon.svg",
navbar: {
title: "",
logo: {
alt: "tjo.space logo",
src: "img/logo-dark.svg",
srcDark: "img/logo-light.svg",
},
items: [
{
type: "docSidebar",
sidebarId: "documentationSidebar",
position: "left",
label: "Documentation",
},
{ to: "/blog", label: "Blog", position: "left" },
{ to: "https://status.tjo.space", label: "Status", position: "left" },
{
type: "localeDropdown",
position: "right",
},
],
},
footer: {
style: "light",
logo: { src: "img/logo-dark.svg", srcDark: "img/logo-light.svg" },
links: [
{
title: "Articles",
items: [
{
label: "Documentation",
to: "/docs/home",
},
{
label: "Blog",
to: "/blog",
},
],
},
{
title: "Community",
items: [
{
label: "Matrix Room #hello:tjo.space",
href: "https://matrix.to/#/#hello:tjo.space",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} tjo.space. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;