Some notes on Docusaurus v2.
In Docusaurus post dates are not extracted from YAML frontmatter, but instead are taken from the .md filename.
. ├── 2019-05-28-first-blog-post.md ├── 2019-05-29-long-blog-post.md ├── 2021-08-01-mdx-blog-post.mdx ├── 2021-08-26-welcome │ ├── docusaurus-plushie-banner.jpeg │ └── index.md └── authors.yml
Also note that markdown files can be grouped in folders with images or not.
Author info is extracted from the
yml file shown above which takes this format
nick: name: Nicholas Coughlin title: Founder @ bidbear.io url: https://ncoughlin.com image_url: https://github.com/ncoughlin.png
and is then referenced in the
yml frontmatter for a post.
--- slug: welcome title: Welcome authors: [nick] tags: [facebook, hello, docusaurus] ---
The docs are generated from the docs folder and items there take this file structure
. ├── intro.md ├── tutorial-basics │ ├── _category_.json │ ├── congratulations.md │ ├── create-a-blog-post.md │ ├── create-a-document.md │ ├── create-a-page.md │ ├── deploy-your-site.md │ └── markdown-features.mdx └── tutorial-extras ├── _category_.json ├── img │ ├── docsVersionDropdown.png │ └── localeDropdown.png ├── manage-docs-versions.md └── translate-your-site.md
And from this it’s not clear how these items are ordered in the sidebar. That is done with frontmatter in the files
--- sidebar_position: 1 ---
and that position is relative to it’s location, so if it’s a markdown file in one of the folders, it would be the position of the item in that folder.