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

Fixing Internal Links #5552

Merged
merged 2 commits into from
Oct 29, 2018
Merged

Fixing Internal Links #5552

merged 2 commits into from
Oct 29, 2018

Conversation

ehfeng
Copy link
Contributor

@ehfeng ehfeng commented Oct 24, 2018

Internal links, like those found on Available Scripts
use absolute urls and therefore link to https://facebook.github.io/docs/deployment instead of
https://facebook.github.io/create-react-app/docs/deployment.

This fix is based on what I read here. I attempted to build the docs locally but couldn't figure out how.

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up 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 the corporate CLA signed.

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

@facebook-github-bot
Copy link

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

@absrivastava
Copy link

@ehfeng Tried running locally, its working for me. Can you please share the error ?

Steps for running locally :
go to /docusaurus/website
then run
npm install
npm start

Copy link
Contributor

@yangshun yangshun left a comment

Choose a reason for hiding this comment

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

The internal links should point to a markdown file instead of a path and it should work. I also realized that /docs/deployments should not have an s as the file is now called deployment.md. Could you take note of that while you're at it? Thanks!

@@ -8,7 +8,7 @@ sidebar_label: Adding CSS Modules

This project supports [CSS Modules](https://github.com/css-modules/css-modules) alongside regular stylesheets using the `[name].module.css` file naming convention. CSS Modules allows the scoping of CSS by automatically creating a unique classname of the format `[filename]\_[classname]\_\_[hash]`.

> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](/docs/adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
> **Tip:** Should you want to preprocess a stylesheet with Sass then make sure to [follow the installation instructions](docs/adding-a-sass-stylesheet) and then change the stylesheet file extension as follows: `[name].module.scss` or `[name].module.sass`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Changing to docs/adding-a-sass-stylesheet makes the link become relative and the result is https://facebook.github.io/docs/docs/adding-a-sass-stylesheet which is still wrong.

Change to [follow the installation instructions](adding-a-sass-stylesheet.md) and see if it works.

Copy link
Contributor Author

@ehfeng ehfeng left a comment

Choose a reason for hiding this comment

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

@yangshun Fixed now, tested locally as well. Fixed a bunch of randomly broken links as well.

@ehfeng
Copy link
Contributor Author

ehfeng commented Oct 26, 2018

Thanks @absrivastava. It's working for me now too. Late night, not sure why it didn't work.

Copy link
Contributor

@selbekk selbekk left a comment

Choose a reason for hiding this comment

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

Looks good to me - didn't know linking to the .md files directly worked!

@amyrlam
Copy link
Contributor

amyrlam commented Oct 29, 2018

I reran the Travis build, green now, not sure why it was error before.

Ok to merge? Can we push the latest Docusaurus to GitHub pages after merge? (A few PR's have come in after the initial push.) Wondering if I should do that? Let me know, would follow https://docusaurus.io/docs/en/publishing#using-github-pages

@Timer Timer added this to the 2.1 milestone Oct 29, 2018
@Timer Timer merged commit 2a7fd5a into facebook:master Oct 29, 2018
@ehfeng ehfeng deleted the fix-internal-links branch October 30, 2018 01:32
nate770 pushed a commit to ONTW/create-react-app that referenced this pull request Oct 30, 2018
* Fixing Internal Links

Internal links, like those found on [Available Scripts](https://facebook.github.io/create-react-app/docs/available-scripts)
use absolute urls and therefore link to https://facebook.github.io/docs/deployment instead of
https://facebook.github.io/create-react-app/docs/deployment.

* changing to markdown links and fixing various broken internal links
@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants