174 lines
4.9 KiB
JavaScript
174 lines
4.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 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"],
|
|
},
|
|
|
|
scripts: [
|
|
"https://tjo.space/js/script.js",
|
|
{
|
|
src: "https://tjo.space/js/script.js",
|
|
defer: true,
|
|
"data-api": "https://tjo.space/api/event",
|
|
"data-domain": "tjo.space",
|
|
},
|
|
],
|
|
|
|
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"),
|
|
},
|
|
sitemap: {
|
|
changefreq: "weekly",
|
|
priority: 0.5,
|
|
ignorePatterns: ["/tags/**"],
|
|
filename: "sitemap.xml",
|
|
},
|
|
}),
|
|
],
|
|
],
|
|
|
|
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} */
|
|
({
|
|
announcementBar: {
|
|
id: "work_in_progress",
|
|
content:
|
|
"This site is still a work in progress. Expect content to be added in the following months.",
|
|
backgroundColor: "#ffdd80",
|
|
textColor: "#091E42",
|
|
isCloseable: false,
|
|
},
|
|
// 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" },
|
|
{ type: "custom-status-navbar-item", position: "left" },
|
|
{ type: "custom-services-navbar-item", position: "left" },
|
|
{
|
|
type: "search",
|
|
position: "right",
|
|
},
|
|
{
|
|
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;
|