Skip to content

Commit

Permalink
update 2 files, delete 1 file and create 1 file
Browse files Browse the repository at this point in the history
  • Loading branch information
liviaerxin committed Jun 6, 2024
1 parent de9a99e commit 1fafb49
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 78 deletions.
171 changes: 95 additions & 76 deletions _ssg/docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import type {Config} from '@docusaurus/types';
import type * as Preset from '@docusaurus/preset-classic';
const simplePlantUML = require("@akebifiky/remark-simple-plantuml");
const simplePlantUML = require('@akebifiky/remark-simple-plantuml');

import websiteConfig from './website_config.json';

Expand Down Expand Up @@ -87,7 +87,8 @@ const config: Config = {
sidebarPath: './sidebars.ts',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/liviaerxin/liviaerxin.github.io/edit/master/_ssg/docusaurus/',
editUrl:
'https://github.com/liviaerxin/liviaerxin.github.io/edit/master/_ssg/docusaurus/',
showLastUpdateAuthor: true,
showLastUpdateTime: true,
remarkPlugins: [remarkMath, simplePlantUML],
Expand Down Expand Up @@ -119,84 +120,102 @@ const config: Config = {
],

themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
// docs: {
// sidebar: {
// hideable: true,
// autoCollapseCategories: true,
// },
// },
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
// docs: {
// sidebar: {
// hideable: true,
// autoCollapseCategories: true,
// },
// },
colorMode: {
defaultMode: 'light',
disableSwitch: false,
respectPrefersColorScheme: true,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
'powershell',
'csharp',
'bash',
'python',
'plsql',
'sql',
'editorconfig',
'log',
'regex',
'armasm',
'nasm',
],
},
mermaid: {
theme: {light: 'neutral', dark: 'forest'},
options: {
maxTextSize: 100000,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['powershell', 'csharp', 'bash', 'python', 'plsql', 'sql', 'editorconfig', 'log', 'regex', 'armasm', 'nasm'],
},
sitemap: {
cacheTime: 6000 * 1000, // 600 sec - cache purge period
changefreq: 'weekly',
priority: 0.5,
},
// github codeblock theme configuration
codeblock: {
showGithubLink: true,
githubLinkLabel: 'View on GitHub',
showRunmeLink: false,
runmeLinkLabel: 'Checkout via Runme',
},
navbar: {
hideOnScroll: true,
title: "S' Wiki",
logo: {
alt: 'My Site Logo',
src: 'https://github.com/liviaerxin.png',
},
mermaid: {
theme: {light: 'neutral', dark: 'forest'},
options: {
maxTextSize: 100000,
items: [
// When type: 'default', it is [Navbar link](https://docusaurus.io/docs/api/themes/configuration#navbar-link)
// {
// to: '/docs/introduction',
// label: 'Docs',
// position: 'left',
// },
{
type: 'docSidebar',
position: 'left',
sidebarId: 'docs',
label: 'Docs',
},
},
sitemap: {
cacheTime: 6000 * 1000, // 600 sec - cache purge period
changefreq: 'weekly',
priority: 0.5,
},
// github codeblock theme configuration
codeblock: {
showGithubLink: true,
githubLinkLabel: 'View on GitHub',
showRunmeLink: false,
runmeLinkLabel: 'Checkout via Runme'
},
navbar: {
hideOnScroll: true,
title: "S' Wiki",
logo: {
alt: 'My Site Logo',
src: 'https://github.com/liviaerxin.png',
{to: '/blog', label: 'Blog', position: 'left'},
{to: '/learning', label: 'Learning', position: 'left'},
{to: '/portfolio', label: 'Portfolio', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
items: [
{
type: 'doc',
position: 'left',
docId: 'README',
label: 'Docs',
},
{to: '/blog', label: 'Blog', position: 'left'},
{to: '/learning', label: 'Learning', position: 'left'},
{to: '/portfolio', label: 'Portfolio', position: 'left'},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
links: [
{
items: [
{
html: `<a class='footer__link-item' target='_blank' rel='noopener' href='https://github.com/${websiteConfig.GITHUB_USER}'><img class='svg-inline--fa fa-github fa-w-14' src="/img/github-tile.svg"/></a>`,
},
{
html: `<a class='footer__link-item' target='_blank' rel='noopener noreferrer' href='https://stackoverflow.com/users/${websiteConfig.STACKOVERFLOW_USER}'><img class='svg-inline--fa fa-stackoverflow fa-w-14' src="/img/stackoverflow-tile.svg" /></a>`,
},
{
html: `<a class='footer__link-item' target='_blank' rel='noopener noreferrer' href='https://linkedin.com/in/${websiteConfig.LINKEDIN_USER}'><img class='svg-inline--fa fa-linkedin fa-w-14' src="/img/linkedin-tile.svg" /></a>`,
},
],
},
],
copyright: `<span style='font-size: 10px;'>Copyright ©2020-present Frank. Built with Docusaurus.</span>`,
},
],
},
footer: {
links: [
{
items: [
{
html: `<a class='footer__link-item' target='_blank' rel='noopener' href='https://github.com/${websiteConfig.GITHUB_USER}'><img class='svg-inline--fa fa-github fa-w-14' src="/img/github-tile.svg"/></a>`,
},
{
html: `<a class='footer__link-item' target='_blank' rel='noopener noreferrer' href='https://stackoverflow.com/users/${websiteConfig.STACKOVERFLOW_USER}'><img class='svg-inline--fa fa-stackoverflow fa-w-14' src="/img/stackoverflow-tile.svg" /></a>`,
},
{
html: `<a class='footer__link-item' target='_blank' rel='noopener noreferrer' href='https://linkedin.com/in/${websiteConfig.LINKEDIN_USER}'><img class='svg-inline--fa fa-linkedin fa-w-14' src="/img/linkedin-tile.svg" /></a>`,
},
],
},
],
copyright: `<span style='font-size: 10px;'>Copyright ©2020-present Frank. Built with Docusaurus.</span>`,
},
} satisfies Preset.ThemeConfig,
} satisfies Config;

Expand Down
4 changes: 2 additions & 2 deletions _ssg/docusaurus/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
// `docs`: sidebar Id, `autogenerated` let Docusaurus generates a sidebar from the docs folder structure
docs: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
Expand All @@ -28,4 +28,4 @@ const sidebars: SidebarsConfig = {
*/
};

export default sidebars;
export default sidebars;
Empty file removed docs/README.md
Empty file.
4 changes: 4 additions & 0 deletions docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
sidebar_position: 1
---
# Hello!

0 comments on commit 1fafb49

Please sign in to comment.