This website is built using Docusaurus, a modern static website generator.
修改此文件内容 src/components/ImageLinks.tsx
src/components/ImageLinks.tsx
中包含所有适用的镜像最新版本和下载链接,引用最新版链接请使用 mdx
并使用相关函数(见: 此处用法)
src/components/LocaleImage.tsx
中可以在 en
的 i18n 下使用 file.en.ext
的图片(如果存在),用法见这里,搜索 <LocaleImage
- 图片放在
/static/img
下,引用为/img/...
Sidebar 全自动索引,在每篇文章中通过 第一个标题 或 markdown meta
---
title: your title
sidebar_position: 1
---
确定标题和其所在的位置。
对于文件夹,可以在文件夹中放置 _category_.json
手动设定其标题和所在位置,见此处
src/pages/projects.tsx
下面可以添加,具体每一项意义见 src/components/InfoCard.tsx
InfoCardProps
为了解决这个问题facebook/docusaurus issues#3372,默认为所有链接后面加上了一个 /
, 因此跳转到其他页面需要向上一级走一次
中文:
$ yarn start
英文:
$ yarn start --locale en
只可以同时开发一种语言的文档
$ yarn build
i18n/en/docusaurus-plugin-content-docs/current
下与 docs/
目录对应的文件就是英文版
$ npm run write-translations -- --locale en
然后在 i18n/en
下的 json
文件中翻译