Skip to content
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

Merged
merged 2 commits into from
Aug 30, 2021
Merged

docs: document doc tags + refinements #5433

merged 2 commits into from
Aug 30, 2021

Conversation

Josh-Cena
Copy link
Collaborator

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

Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 27, 2021
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
@netlify
Copy link

netlify bot commented Aug 27, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 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

@github-actions
Copy link

github-actions bot commented Aug 27, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 97
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-5433--docusaurus-2.netlify.app/

@netlify
Copy link

netlify bot commented Aug 27, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 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:
Copy link
Contributor

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?

Copy link
Collaborator Author

@Josh-Cena Josh-Cena Aug 28, 2021

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

Copy link
Contributor

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. 😉

@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Aug 30, 2021
@slorber
Copy link
Collaborator

slorber commented Aug 30, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No documentation on how to use tags with docs pages
4 participants