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: add note about files being ignored when prefixed with an unders… #5543

Merged
merged 1 commit into from
Sep 11, 2021
Merged

docs: add note about files being ignored when prefixed with an unders… #5543

merged 1 commit into from
Sep 11, 2021

Conversation

KyrietS
Copy link
Contributor

@KyrietS KyrietS commented Sep 8, 2021

Documentation does not mention the fact that all files prefixed with an underscores are ignored. I had some markdown pages prefixed this way and after Docusaurus upgrade they disappeared.

Motivation

Documentation doesn't mention this important fact.

Have you read the Contributing Guidelines on pull requests?

👍

Test Plan

n/a

Related PRs

n/a

@facebook-github-bot
Copy link
Contributor

Hi @KyrietS!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@netlify
Copy link

netlify bot commented Sep 8, 2021

✔️ [V2]
Built without sensitive environment variables

🔨 Explore the source changes: 0046932

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/613a5c4e7cfb6400072d8b4a

😎 Browse the preview: https://deploy-preview-5543--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Sep 8, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Copy link
Contributor

@lex111 lex111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but this feature is documented in separate section.
https://docusaurus.io/docs/markdown-features/react#importing-markdown
Did you read it?

@KyrietS
Copy link
Contributor Author

KyrietS commented Sep 9, 2021

Hi @lex111,
No, I didn't find it 😅. When I realized that _myPage.md is not generating then I searched the docs for the phrase "underscore". I never would have guessed that this information would be in the section about importing Markdown files in React...

I still think this information should be a little more exposed. But if you disagree then I don't mind closing this PR.

@lex111
Copy link
Contributor

lex111 commented Sep 9, 2021

Since this is stand-alone functionality that should better be documented in single place. Let's just add an explanatory keyword "underscore" after _ to improve the search results.

By convention, using the _ (underscore) filename prefix ...

@Josh-Cena
Copy link
Collaborator

Josh-Cena commented Sep 9, 2021

I agree with @KyrietS. If I'm a normal user who never uses JSX syntax in Markdown, I shouldn't be obligated to read that section (even when it's technically in the "Guides" section—people are lazy and only read those they need). I read the "Create a doc" and it tells me to create a Markdown file, but when I did, nothing shows up.

For these casual users, it's better to explain everything they need in one place instead of having the essential information scattered everywhere. (For example, we just recently added duplicated explanations about the relationship between preset config and plugin config everywhere—it's certainly not undocumented before, but more clarification is never harmful)

@lex111
Copy link
Contributor

lex111 commented Sep 9, 2021

Alright, I don't mind that, but let's also add link to corresponding section describing this functionality.

@KyrietS
Copy link
Contributor Author

KyrietS commented Sep 9, 2021

Alright, I've added a link:

All files prefixed with an underscore (_) under the docs directory are treated as "partial" pages and will be ignored by default.

Read more about importing partial pages.

@lex111 lex111 added the pr: documentation This PR works on the website or other text documents in the repo. label Sep 11, 2021
@lex111 lex111 merged commit 9a089d4 into facebook:main Sep 11, 2021
@lex111
Copy link
Contributor

lex111 commented Sep 11, 2021

@KyrietS thanks!

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.

None yet

4 participants