tjo.space/docusaurus.config.js

143 lines
3.9 KiB
JavaScript
Raw Normal View History

2023-09-10 16:01:52 +00:00
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
2023-09-10 18:24:56 +00:00
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
2023-09-10 16:01:52 +00:00
/** @type {import('@docusaurus/types').Config} */
const config = {
2023-09-10 18:24:56 +00:00
title: "tjo.space",
tagline: "Your local cloud ☁️",
favicon: "img/icon.svg",
2023-09-10 16:01:52 +00:00
// Set the production url of your site here
2023-09-10 18:24:56 +00:00
url: "https://tjo.space",
2023-09-10 16:01:52 +00:00
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
2023-09-10 18:24:56 +00:00
baseUrl: "/",
2023-09-10 16:01:52 +00:00
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
2023-09-10 18:24:56 +00:00
organizationName: "tjo-space", // Usually your GitHub org/user name.
projectName: "tjo.space", // Usually your repo name.
2023-09-10 16:01:52 +00:00
2023-09-10 18:24:56 +00:00
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
2023-09-10 16:01:52 +00:00
// 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: {
2023-09-10 18:24:56 +00:00
defaultLocale: "en",
locales: ["en", "sl"],
2023-09-10 16:01:52 +00:00
},
presets: [
[
2023-09-10 18:24:56 +00:00
"classic",
2023-09-10 16:01:52 +00:00
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
2023-09-10 18:24:56 +00:00
sidebarPath: require.resolve("./sidebars.js"),
2023-09-10 16:01:52 +00:00
editUrl:
2023-09-10 18:24:56 +00:00
"https://code.tjo.space/tjo-space/tjo.space/src/branch/main/",
2023-09-10 16:01:52 +00:00
},
blog: {
showReadingTime: true,
editUrl:
2023-09-10 18:24:56 +00:00
"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,
});
},
},
2023-09-10 16:01:52 +00:00
},
theme: {
2023-09-10 18:24:56 +00:00
customCss: require.resolve("./src/css/custom.css"),
2023-09-10 16:01:52 +00:00
},
}),
],
],
2023-09-10 18:24:56 +00:00
themes: [
[
require.resolve("@easyops-cn/docusaurus-search-local"),
{
hashed: true,
indexDocs: true,
indexBlog: true,
indexPages: true,
language: ["en"], // sl is not supported
},
],
],
2023-09-10 16:01:52 +00:00
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
2023-09-10 18:24:56 +00:00
image: "img/docusaurus-social-card.jpg",
2023-09-10 16:01:52 +00:00
navbar: {
2023-09-10 18:24:56 +00:00
title: "",
2023-09-10 16:01:52 +00:00
logo: {
2023-09-10 18:24:56 +00:00
alt: "tjo.space logo",
src: "img/logo.svg",
2023-09-10 16:01:52 +00:00
},
items: [
{
2023-09-10 18:24:56 +00:00
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Tutorial",
2023-09-10 16:01:52 +00:00
},
2023-09-10 18:24:56 +00:00
{ to: "/blog", label: "Blog", position: "left" },
2023-09-10 16:01:52 +00:00
{
2023-09-10 18:24:56 +00:00
type: "localeDropdown",
position: "right",
2023-09-10 16:01:52 +00:00
},
],
},
footer: {
2023-09-10 18:24:56 +00:00
style: "dark",
2023-09-10 16:01:52 +00:00
links: [
{
2023-09-10 18:24:56 +00:00
title: "Docs",
2023-09-10 16:01:52 +00:00
items: [
{
2023-09-10 18:24:56 +00:00
label: "Tutorial",
to: "/docs/intro",
2023-09-10 16:01:52 +00:00
},
],
},
{
2023-09-10 18:24:56 +00:00
title: "Community",
2023-09-10 16:01:52 +00:00
items: [
{
2023-09-10 18:24:56 +00:00
label: "Matrix Chat",
href: "https://matrix.to/#/#hello:tjo.space",
2023-09-10 16:01:52 +00:00
},
{
2023-09-10 18:24:56 +00:00
label: "Public Source Code",
href: "https://code.tjo.space/tjo-space",
2023-09-10 16:01:52 +00:00
},
],
},
],
2023-09-10 18:24:56 +00:00
copyright: `Copyright © ${new Date().getFullYear()} tjo.space. Built with Docusaurus.`,
2023-09-10 16:01:52 +00:00
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
};
module.exports = config;