tjo.space/docusaurus.config.js

142 lines
3.9 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 local cloud ☁️",
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/docusaurus-social-card.jpg",
navbar: {
title: "",
logo: {
alt: "tjo.space logo",
src: "img/logo.svg",
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Tutorial",
},
{ to: "/blog", label: "Blog", position: "left" },
{
type: "localeDropdown",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Docs",
items: [
{
label: "Tutorial",
to: "/docs/intro",
},
],
},
{
title: "Community",
items: [
{
label: "Matrix Chat",
href: "https://matrix.to/#/#hello:tjo.space",
},
{
label: "Public Source Code",
href: "https://code.tjo.space/tjo-space",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} tjo.space. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;