Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Documentation cleanup #910

Merged
merged 12 commits into from
May 29, 2018
Merged

Documentation cleanup #910

merged 12 commits into from
May 29, 2018

Conversation

edmorley
Copy link
Member

  • Replaces neutrino.js.org URLs with neutrinojs.org (like [v8.x] Changes for neutrino.js.org to neutrinojs.org transition #903 did for release/v8).
  • Fixes broken URLs as well as those that HTTP 301 redirect (eg due to lack of trailing slashes) - as found by https://validator.w3.org/checklink
  • Adds a new scripts/build-docs.sh that runs mkdocs build followed by a sed that turns the neutrinojs.org in packages/*/README.md (that are required so the READMEs work on NPM) into relative URLs that will point at the current branch's version of the docs.
  • Removes redundant CNAME file.
  • Makes the Neutrino logo be loaded from the Netlify hosted file, rather than from Github.

This file is shown on the front page of the docs, so doesn't need
to link to itself.
To prevent the HTTP 301 redirect.
Since the page name in the URL is normalised to `/faq/` by Netlify,
but yet the sidebar still links to `/FAQ/` (due to the filename),
causing an unnecessary HTTP 301 redirect.
To avoid the HTTP 301 redirect.
Since the same README.md is shared between the NPM package listing
and the generated docs, there doesn't seem to be a more elegant way
to do it than this.
To avoid unnecessary HTTP 301s, since mkdocs uses `<name>/index.html`
for all pages (unlike gitbook), which Netlify normalises to `/<name>/`.
To avoid the HTTP 301 redirects.
This will mean the image is served over Netlify's CDN.

The link to neutrinojs.org has also been removed, since it's
linking to itself.
@edmorley edmorley added the docs label May 25, 2018
@edmorley edmorley self-assigned this May 25, 2018
@edmorley edmorley requested a review from eliperelman May 25, 2018 21:05
# which have to use absolute URLs so that they work on the NPM package
# pages. This converts them to site-root relative URLs, so that links
# between packages target the current branch's version of the docs.
find build/ -type f -name '*.html' -exec sed -i 's|https://neutrinojs\.org/|/|g' {} +
Copy link
Member

Choose a reason for hiding this comment

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

If I'm reading this line right, this says:

Find all *.html files in the build folder and replace all occurrences of https://neutrinojs.org with a /. Is that right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah but with the trailing slash on the original -- it converts https://neutrinojs.org/foo/bar/ to /foo/bar/.

Copy link
Member

Choose a reason for hiding this comment

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

Ah cool.

Copy link
Member

@eliperelman eliperelman left a comment

Choose a reason for hiding this comment

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

Fantastic 👏

@edmorley edmorley merged commit 64090b6 into master May 29, 2018
@edmorley edmorley deleted the docs-cleanup branch May 29, 2018 15:27
@edmorley edmorley added this to the v9 milestone Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

2 participants