-
Notifications
You must be signed in to change notification settings - Fork 214
Conversation
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.
# 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' {} + |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic 👏
neutrino.js.org
URLs withneutrinojs.org
(like [v8.x] Changes for neutrino.js.org to neutrinojs.org transition #903 did forrelease/v8
).scripts/build-docs.sh
that runsmkdocs build
followed by ased
that turns theneutrinojs.org
inpackages/*/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.CNAME
file.