Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 57 additions & 87 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
import { themes as prismThemes } from 'prism-react-renderer';

const { themes } = require('prism-react-renderer');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;


/** @type {import('@docusaurus/types').Config} */
const config = {
export default {
title: 'Edwardzjl',
tagline: '温故而知新',
url: 'https://edwardzjl.github.io',
Expand All @@ -32,11 +26,18 @@ const config = {
locales: ['en', 'zh-Hans'],
},

markdown: {
mdx1Compat: {
comments: false,
admonitions: false,
headingIds: true,
},
},

presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
Expand All @@ -54,85 +55,54 @@ const config = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
},
],
],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
// {
// type: 'doc',
// docId: 'intro',
// position: 'left',
// label: 'Tutorial',
// },
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/edwardzjl/edwardzjl.github.io',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
// {
// title: 'Docs',
// items: [
// {
// label: 'Tutorial',
// to: '/docs/intro',
// },
// ],
// },
// {
// title: 'Community',
// items: [
// {
// label: 'Stack Overflow',
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
// },
// {
// label: 'Discord',
// href: 'https://discordapp.com/invite/docusaurus',
// },
// {
// label: 'Twitter',
// href: 'https://twitter.com/docusaurus',
// },
// ],
// },
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/edwardzjl/edwardzjl.github.io',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
themeConfig: {
navbar: {
title: 'My Site',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['bash', 'diff', 'json'],
},
}),
items: [
// {
// type: 'doc',
// docId: 'intro',
// position: 'left',
// label: 'Tutorial',
// },
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/edwardzjl/edwardzjl.github.io',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'More',
items: [
{
label: 'Blog',
to: '/blog',
},
{
label: 'GitHub',
href: 'https://github.com/edwardzjl/edwardzjl.github.io',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
},
};

module.exports = config;