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: make localhost links clickable #7582

Merged
merged 2 commits into from Jun 8, 2022

Conversation

dht
Copy link
Contributor

@dht dht commented Jun 8, 2022

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Clickable localhost links makes it easier for people getting started with docusarus to follow the getting-started guides.

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@facebook-github-bot
Copy link
Contributor

Hi @dht!

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!

@@ -39,7 +39,7 @@ Start your site on the French locale:
npm run start -- --locale fr
```

Your localized site is accessible at `http://localhost:3000/fr/` and the `Getting Started` page is translated.
Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please don't modify the examples folder—these are autogenerated. Otherwise, LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done,
@Josh-Cena your PR response might be a legit candidate for the fastest PR response in Github's history ;-p

@netlify
Copy link

netlify bot commented Jun 8, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit e0e06fc
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/62a03c162a67480008de5c57
😎 Deploy Preview https://deploy-preview-7582--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟢 91 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 77 🟢 100 🟢 100 🟢 100 🟢 90 Report

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

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@Josh-Cena Josh-Cena added the pr: documentation This PR works on the website or other text documents in the repo. label Jun 8, 2022
@@ -51,7 +51,7 @@ export default function Hello() {
}
```

Once you save the file, the development server will automatically reload the changes. Now open `http://localhost:3000/helloReact` and you will see the new page you just created.
Once you save the file, the development server will automatically reload the changes. Now open [http://localhost:3000/helloReact](http://localhost:3000/helloReact) and you will see the new page you just created.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure if this is necessarily useful—but I never followed this part of the tutorial when learning Docusaurus so I can't speak for others. Is it useful for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I myself started following the tutorial half an hour ago and this is the first page I came across.
I found myself copy/pasting the links over and over so in the eyes of the next developer who will go through his/her first steps I personally found this change as useful.
Are you referring specifically to this markdown?

Copy link
Collaborator

@Josh-Cena Josh-Cena Jun 8, 2022

Choose a reason for hiding this comment

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

Yes, to the Markdown files on the website. Do you read them with a dev server running and actually go through them step-by-step? I can clearly relate to the changes in the create-docusaurus templates.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, as mentioned in the fast track.
I installed a fresh site:

npx create-docusaurus@latest my-website classic

then started the site:

cd my-website
npx docusaurus start

and went on with the 3rd instruction:

Open http://localhost:3000 and follow the tutorial.

Copy link
Contributor Author

@dht dht Jun 8, 2022

Choose a reason for hiding this comment

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

If the markdown you are referring to is not the one visible when running those steps I can revert those too, no problem. I may have made a mistake regarding which ones are served when you follow the guide. I simply performed a project-wide search with this string:

`http://locahost:3000

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, makes sense... Just not sure about further down where the instructions go into more details and often involves completely contrived examples that I assume people just don't bother copying.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the markdown you are referring to is not the one visible when running those steps I can revert those too

Yeah those are further down, but I'm fine. If we are to do it we'd rather do it all so it's consistent. Maybe people will find it useful?

Copy link
Contributor Author

@dht dht Jun 8, 2022

Choose a reason for hiding this comment

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

I like the documentation so far, I find it to the point and easy to follow. You might say it's expected for a documentation-builder project's documentation :-)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great to hear! We constantly improve it as well, and I definitely think this is going in the right direction.

@Josh-Cena Josh-Cena changed the title docs: clickable localhost links docs: make localhost links clickable Jun 8, 2022
@Josh-Cena Josh-Cena merged commit 5c9e4a2 into facebook:main Jun 8, 2022
@Josh-Cena
Copy link
Collaborator

Thanks for the contribution @dht and for staying around to address reviews promptly. Much appreciated.

@@ -31,4 +31,4 @@ Congratulations, you have made your first post!
Feel free to play around and edit this post as much you like.
```

A new blog post is now available at `http://localhost:3000/blog/greetings`.
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW I think the following is a simpler way to achieve the same:

<http://localhost:3000/blog/greetings>

Copy link
Collaborator

@Josh-Cena Josh-Cena Jul 9, 2022

Choose a reason for hiding this comment

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

Autolinks are being removed in MDX v2, so I'll avoid them for now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good to know. Thank you.

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