-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: document doc tags + refinements #5433
Conversation
Signed-off-by: Josh-Cena <[email protected]>
Signed-off-by: Josh-Cena <[email protected]>
✔️ [V2] 🔨 Explore the source changes: 54c51e1 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6128fe916f4f810008057c52 😎 Browse the preview: https://deploy-preview-5433--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-5433--docusaurus-2.netlify.app/ |
✔️ [V2] 🔨 Explore the source changes: b01e9f9 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/6128ff00a2383d00083640af 😎 Browse the preview: https://deploy-preview-5433--docusaurus-2.netlify.app |
--- | ||
id: doc-with-tags | ||
title: A doc with tags | ||
tags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just tested Docusaurus beta.5
and this also works fine:
tags: [Demo, Getting Started]
Do you only want to show one way, or do you want to show both the list-format and the array-format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Um, they are both valid YAML formats anyways, not sure if the purpose here is to educate writing valid YAML objects
P.S. I actually prefer writing tags: [Demo, Getting Started]
😁 But for several reasons:
tags: [Demo, Getting Started]
is already demonstrated in blog front matter documentation and init template so users should realize it's valid- The
- Demo
syntax involves less programmatic construct (less JSONic) so it may be more readable
I in the end chose the YAML format instead of JSON
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I never knew that the Markdown frontmatter is supposed to be a valid YAML object. I learned something new today... 😄
I'll let you decide what you like to do here. 😉
Thanks 👍 I don't feel like this is the best place to document this, but at the same time it's probably overkill to create a new page just for that 🤪 so it will be fine for now |
Motivation
Resolve #5432. Also added
prettier-ignore
directives to prevent extra new-lines from being added.Have you read the Contributing Guidelines on pull requests?
Yes