Skip to content

Commit 46d2aa2

Browse files
rojakcoderslorber
andauthored
docs: add description on blog post file/folder naming conventions and date extraction patterns (#8845)
Co-authored-by: Sébastien Lorber <[email protected]>
1 parent 1d42955 commit 46d2aa2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

website/docs/blog.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ module.exports = {
144144

145145
## Blog post date {#blog-post-date}
146146

147-
Docusaurus will extract a `YYYY-MM-DD` date from a file/folder name such as `YYYY-MM-DD-my-blog-post-title.md`.
147+
Docusaurus will extract a `YYYY-MM-DD` date from many patterns such as `YYYY-MM-DD-my-blog-post-title.md` or `YYYY/MM/DD/my-blog-post-title.md`. This enables you to easily group blog posts by year, by month, or to use a flat structure.
148148

149149
<details>
150-
<summary>Example supported patterns</summary>
150+
<summary>Supported date extraction patterns</summary>
151151

152152
| Pattern | Example |
153153
| --- | --- |
@@ -160,7 +160,7 @@ Docusaurus will extract a `YYYY-MM-DD` date from a file/folder name such as `YYY
160160
| Nested folders + `index.md` | `2021/05/28/my-blog-post-title/index.md` |
161161
| Date in the middle of path | `category/2021/05-28-my-blog-post-title.md` |
162162

163-
The date will be excised from the path and appended to the beginning of the URL slug.
163+
Docusaurus can extract the date from the posts using any of the naming patterns above. It is advisable to choose one pattern and apply it to all posts to avoid confusion.
164164

165165
</details>
166166

0 commit comments

Comments
 (0)