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(v2): improve cli docs #4259

Merged
merged 8 commits into from
Feb 22, 2021
Merged

docs(v2): improve cli docs #4259

merged 8 commits into from
Feb 22, 2021

Conversation

massoudmaboudi
Copy link
Contributor

Motivation

This part was missing in the documents and it is kinda useful to have this kinda referencing.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Run yarn run start:v2 and check that the page http://localhost:3000/ is rendered properly.

Related PRs

No

@netlify
Copy link

netlify bot commented Feb 21, 2021

[V1] Deploy preview success

Built with commit 94fc7aa

https://deploy-preview-4259--docusaurus-1.netlify.app

@netlify
Copy link

netlify bot commented Feb 21, 2021

Deploy preview for docusaurus-2 ready!

Built with commit 94fc7aa

https://deploy-preview-4259--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Feb 21, 2021

⚡️ Lighthouse report for the changes in this PR:

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

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

@github-actions
Copy link

github-actions bot commented Feb 21, 2021

Size Change: 0 B

Total Size: 543 kB

ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 86.6 kB 0 B
website/build/assets/js/main.********.js 370 kB 0 B
website/build/blog/2017/12/14/introducing-docusaurus/index.html 60.5 kB 0 B
website/build/docs/introduction/index.html 235 B 0 B
website/build/index.html 25.6 kB 0 B

compressed-size-action

@massoudmaboudi
Copy link
Contributor Author

massoudmaboudi commented Feb 22, 2021

I added npm run swizzle instead of docusaurus swizzle because we use npx to install the documentation. So, when we use docusaurus swizzle, it shows an error that 'docusaurus: command not found'.

@massoudmaboudi
Copy link
Contributor Author

massoudmaboudi commented Feb 22, 2021

I added the blog reference part while compiling,
"blog/2021-01-02-hello-there"
will be converted to
"blog/2021/01/02/hello-there"
in the URL. For a normal user, this conversion is mysterious. But this explanation can remove this issue.

Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

thanks, will just add the npm2yarn tabs everywhere :)

website/docs/using-themes.md Outdated Show resolved Hide resolved
website/docs/cli.md Outdated Show resolved Hide resolved
website/docs/cli.md Outdated Show resolved Hide resolved
@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Feb 22, 2021
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

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

@massoudmaboudi please make smaller pull requests instead of one big that do multiple things.

I'm willing to merge:

  • the fa translation file
  • the CLI-related doc changes

But I'm not really willing to merge the "referencing blog posts" doc.

If you made 3 separate PRs I would have been able to merge 2 of the 3 ;)

@slorber
Copy link
Collaborator

slorber commented Feb 22, 2021

Extracted the fa translations to #4271

Will clean up the current PR from the "referencing" section and merge it, but feel free to resubmit it if you feel we should add more doc, but to me, this has nothing to do with the markdown features, it's just a regular link.

Here's a "backup" of your doc in case you find this useful:


Referencing blog posts

If you want to reference a blog post file, you could use the name of the post you want to reference.

For example, if you are in folder/doc1.md and you want to reference blog/2021-01-02-hello-there.md:

---
title: Hello There
---

You can add a slug to a blog post in its metadata. Consider another blog post named blog/2021-01-08-bye-everyone.md:

---
title: Bye Everyone
slug: bye-everyone
---

I am referencing a blog post in ../../blog/2021/01/02/hello-there.

Reference to another blog post with a slug in ../../blog/bye-everyone.

:::caution Be careful that we should convert the address of the blog post without slug from:

blog/2021-01-02-hello-there to blog/2021/01/02/hello-there :::

@slorber slorber changed the title Docs improve docs(v2): improve cli docs Feb 22, 2021
@slorber slorber merged commit 704df68 into facebook:master Feb 22, 2021
@massoudmaboudi
Copy link
Contributor Author

@slorber
If you think it is not a good idea to add the blog referencing, then I will close the PR willingly.

@slorber
Copy link
Collaborator

slorber commented Feb 23, 2021

I don't think it's a good idea, it's just a regular link nothing else. If we were to add this kind of doc, it couldn't be related to "markdown features" nor the blog, but be more generic, because it's just a link, and the link in md or in blog posts or in page is the same concept under the hood

@massoudmaboudi massoudmaboudi deleted the docs-improve branch February 27, 2021 06:38
@lex111 lex111 added this to the v2.0.0-alpha.71 milestone Mar 1, 2021
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.

4 participants