Skip to content

docs: document doc tags + refinements - #5433

Merged
slorber merged 2 commits into
meta:mainfrom
Josh-Cena:doc
Aug 30, 2021
Merged

slorber merged 2 commits into
meta:mainfrom
Josh-Cena:doc

Conversation

@Josh-Cena

Copy link
Copy Markdown
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 <[email protected]>
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Aug 27, 2021
Signed-off-by: Josh-Cena <[email protected]>
@netlify

netlify Bot commented Aug 27, 2021

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 27, 2021 •

Copy link
Copy Markdown

⚡️ 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

netlify Bot commented Aug 27, 2021

Copy link
Copy Markdown

---
id: doc-with-tags
title: A doc with tags
tags:

Copy link
Copy Markdown
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?

@Josh-Cena Josh-Cena Aug 28, 2021 •

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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

slorber commented Aug 30, 2021

Copy link
Copy Markdown
Collaborator

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

@slorber
slorber merged commit 1481bc2 into meta:main Aug 30, 2021
@Josh-Cena
Josh-Cena deleted the doc branch August 30, 2021 09:03
mrizwanashiq pushed a commit to mrizwanashiq/docusaurus that referenced this pull request Jun 25, 2026
* Various improvements

Signed-off-by: Josh-Cena <[email protected]>

* Oops

Signed-off-by: Josh-Cena <[email protected]>
sparanoid pushed a commit to sparanoid/docusaurus that referenced this pull request Oct 12, 2026
* Various improvements

Signed-off-by: Josh-Cena <[email protected]>

* Oops

Signed-off-by: Josh-Cena <[email protected]>
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