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

fix: avoid printing period after localhost URL #7499

Merged
merged 2 commits into from May 26, 2022
Merged

fix: avoid printing period after localhost URL #7499

merged 2 commits into from May 26, 2022

Conversation

Zamiell
Copy link
Contributor

@Zamiell Zamiell commented May 26, 2022

When you type npm run serve, Docusaurus will output the following text to your terminal:

[SUCCESS] Serving "docs" directory at http://localhost:3000/.

The next step at this point is to copy the text from the terminal, and then paste it into your browser.
However, the trailing period interferes with this, as it is not part of the URL. and makes it difficult to properly copy the intended text. Thus, this PR.

Related:
When doing npm run start, the page automatically opens in your browser, which is helpful.
Why doesn't this behavior also apply to npm run serve?

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label May 26, 2022
@Josh-Cena
Copy link
Collaborator

Why doesn't this behavior also apply to npm run serve?

Happy to have a PR that ports the open-in-browser behavior to serve as well!

@Zamiell
Copy link
Contributor Author

Zamiell commented May 26, 2022

Ok, I'll see if I can manage it.

@netlify
Copy link

netlify bot commented May 26, 2022

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 0b18025
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/628f16e0d28bdb000883bf0d
😎 Deploy Preview https://deploy-preview-7499--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 May 26, 2022

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 70 🟢 100 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 84 🟢 99 🟢 100 🟢 100 🟢 90 Report

@Josh-Cena
Copy link
Collaborator

Can we remove the period for start as well?

@Zamiell
Copy link
Contributor Author

Zamiell commented May 26, 2022

Oh, sure.

@Josh-Cena Josh-Cena added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label May 26, 2022
@Josh-Cena Josh-Cena changed the title fix: output of URL fix: avoid printing period after localhost URL May 26, 2022
Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Makes sense; thanks!

@Josh-Cena Josh-Cena merged commit f947015 into facebook:main May 26, 2022
@Zamiell Zamiell deleted the output-fix branch May 26, 2022 07:09
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: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants