1 Star 0 Fork 0

小小神/dq-note

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docusaurus.config.js 9.24 KB
一键复制 编辑 原始数据 按行查看 历史
小小神 提交于 2024-03-26 13:21 . init
// @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: [
{
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css',
type: 'text/css',
integrity:
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
crossorigin: 'anonymous',
},
],
};
export default config;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xie-you/dq-note.git
[email protected]:xie-you/dq-note.git
xie-you
dq-note
dq-note
main

搜索帮助