代码拉取完成,页面将自动刷新
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'DQ',
tagline: 'Dinosaurs are cool',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'http://zhile.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: 'dq', // Usually your GitHub org/user name.
projectName: 'dq-doc', // Usually your repo name.
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internationalization, 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: 'zh',
locales: ['zh'],
},
plugins: [
[ // https://github.com/praveenn77/docusaurus-lunr-search
require.resolve('docusaurus-lunr-search'),
{ languages: ['en', 'zh'], maxHits: 8, }
]
],
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
routeBasePath: '/',
// editUrl: 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeKatex],
},
blog: {
showReadingTime: true,
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
},
theme: {
customCss: './src/css/custom.css',
},
}),
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
title: 'DQ-Document',
logo: {
alt: 'DQ',
src: 'img/logo.png',
},
items: [
{
type: 'docSidebar',
sidebarId: 'lang',
position: 'right',
label: '语言',
},
{
type: 'docSidebar',
sidebarId: 'generic',
position: 'right',
label: '通用',
},
{
type: 'docSidebar',
sidebarId: 'article',
position: 'right',
label: '好文',
},
{ to: '/blog', label: '随笔', position: 'right' },
{
type: 'dropdown',
label: '更多',
position: 'right',
items: [
{
label: 'Facebook',
href: 'https://www.facebook.com',
},
],
},
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
position: 'right',
},
],
},
footer: {
// style: 'dark',
links: [
{
title: '我的文档',
items: [
{
html: `<div style="vertical-align: middle">
<img src="http://zhile.space/favicon.ico" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://www.zhile.space" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">DQ-Paradise</span>
</a>
</div>`
},
{
html: `<div style="vertical-align: middle">
<img src="https://img.alicdn.com/imgextra/i3/O1CN01Du15yN1DuuZsvy8g4_!!6000000000277-2-tps-32-32.png" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://www.wolai.com/thanks" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">wolai</span>
</a>
</div>`
},
{
html: `<div style="vertical-align: middle">
<img src="https://p1-hera.feishucdn.com/tos-cn-i-jbbdkfciu3/84a9f036fe2b44f99b899fff4beeb963~tplv-jbbdkfciu3-image:100:100.image" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://www.feishu.com" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">飞书</span>
</a>
</div>`
}
],
},
{
title: '建站相关',
items: [
{
html: `<div style="vertical-align: middle">
<img src="/img/docusaurus.png" alt=" " width="18" height="18" style="vertical-align: middle;"/>
<a href="https://docusaurus.io" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">Docusaurus</span>
</a>
</div>`
},
{
html: `<div style="vertical-align: middle">
<img src="https://github.githubassets.com/favicons/favicon.png" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://github.com/praveenn77/docusaurus-lunr-search" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">文档搜索支持</span>
</a>
</div>`
},
{
html: `<div style="vertical-align: middle">
<img src="https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico" alt=" " width="18" height="18" style="vertical-align: middle; margin-left: -2px"/>
<a href="https://stackoverflow.com/questions/tagged/docusaurus" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">Stack Overflow</span>
</a>
</div>`
},
],
},
{
title: '插画 & 图标',
items: [
{
html: `<div style="vertical-align: middle">
<img src="https://shields.io/img/favicon.ico" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://shields.io/" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">Shields.io</span>
</a>
</div>`
},
{
// https://undraw.co/illustrations
html: `<div style="vertical-align: middle">
<img src="https://undraw.co/favicon.ico" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://undraw.co" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">unDraw</span>
</a>
</div>`
},
{
html: `<div style="vertical-align: middle">
<img src="https://iconscout.com/favicon.ico" alt=" " width="16" height="16" style="vertical-align: middle;"/>
<a href="https://iconscout.com/free-illustrations" target="_blank" rel="noreferrer noopener" style="vertical-align: middle;text-decoration: none">
<span style="vertical-align: middle; color: dimgray">IconScout</span>
</a>
</div>`
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} DQ-Document, Inc. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['java', 'go', 'rust', 'python', 'sql'],
},
}),
stylesheets: [
{
type: 'text/css',
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
};
export default config;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。