Site Preparation
在 安装 Docusaurus之后, 您现在有了一个特定网站的可用骨架。 下面将讨论 Docusaurus 结构的其余部分, 以便您准备建站。
目录结构
正如安装 Docusaurus后所示, 初始化脚本创建了一个类似于以下内容的目录结构:
root-directory
├── docs-examples-from-docusaurus
│ ├── doc1.md
│ ├── doc2.md
│ ├── doc3.md
│ ├── exampledoc4.md
│ └── exampledoc5.md
└── website
├── blog-examples-from-docusaurus
│ ├── 2016-03-11-blog-post.md
│ ├── 2017-04-10-blog-post-two.md
│ ├── 2017-09-25-testing-rss.md
│ ├── 2017-09-26-adding-rss.md
│ └── 2017-10-24-new-version-1.0.0.md
├── core
│ └── Footer.js
├── package.json
├── pages
├── sidebars.json
├── siteConfig.js
└── static
You may have already renamed the example blog (
website/blog-examples-from-docusaurus
) and document (docs-examples-from-docusaurus
) directories when you verified the installation.
website/core/Footer.js
文件是一个React组件,它充当由Docusaurus生成站点的页脚,同时应由用户自己来定制。- The
website/blog-examples-from-docusaurus
directory contains examples of blog posts written in markdown. - The
docs-examples-from-docusaurus
directory contains example documentation files written in markdown. - The
website/pages
directory contains example top-level pages for the site. - The
website/static
directory contains static assets used by the example site. website/siteConfig.js
文件是 Docusaurus 使用的主要配置文件。
您不能删除 website/siteConfig.js
和 website/core/Footer.js
文件, 但可以按您的意愿编辑它们。
You should keep the website/pages
and website/static
directories, but may change the content inside them as you wish. 在 website/pages
目录,你至少应该有一个 en/index.js
或 en/index.html
以及在website/static
里有一个图片作为您的页眉图标(header icon) 。