-
Notifications
You must be signed in to change notification settings - Fork 214
Switch documentation to mkdocs-material and host using Netlify #898
Conversation
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.
Feel free to merge after the netlify.yml
rename.
docs/v7.md
Outdated
@@ -0,0 +1,3 @@ | |||
Placeholder page to work around mkdocs/material's lack of support for | |||
external links in the sidebar. Requests for this page will be redirected | |||
to the URL specified in netlify.yml. |
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.
s/netlify.yml/netlify.toml/
docs/v5.md
Outdated
@@ -0,0 +1,3 @@ | |||
Placeholder page to work around mkdocs/material's lack of support for | |||
external links in the sidebar. Requests for this page will be redirected | |||
to the URL specified in netlify.yml. |
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.
s/netlify.yml/netlify.toml/
docs/v6.md
Outdated
@@ -0,0 +1,3 @@ | |||
Placeholder page to work around mkdocs/material's lack of support for | |||
external links in the sidebar. Requests for this page will be redirected | |||
to the URL specified in netlify.yml. |
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.
s/netlify.yml/netlify.toml/
docs/v4.md
Outdated
@@ -0,0 +1,3 @@ | |||
Placeholder page to work around mkdocs/material's lack of support for | |||
external links in the sidebar. Requests for this page will be redirected | |||
to the URL specified in netlify.yml. |
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.
s/netlify.yml/netlify.toml/
mkdocs.yml
Outdated
- style-minify: './packages/style-minify.md' | ||
- stylelint: './packages/stylelint.md' | ||
# External links aren't supported in the sidebar, so we link to a | ||
# blank page that has a corresponding redirect in netlify.yml. |
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.
s/netlify.yml/netlify.toml/
I've updated the PR to:
|
After the recent Gitbook hosted beta bugs & lack of ability to customise, we're going to try using the static site generator mkdocs, along with the mkdocs-material theme: http://www.mkdocs.org/ https://squidfunk.github.io/mkdocs-material/ The site will be hosted by Netlify, with each version of the docs being built from the respective branch, and served on different subdomains. Notable changes with mkdocs-material compared to Gitbook: * Index pages must be named `index.md` not `README.md` * All pages are converted to pretty URLs. eg `api.md` becomes `/api/`, which makes the extra directory nesting for just one file (eg `api/index.md`) unnecessary. * External links are not supported in the sidebar, so placeholder pages have been added, for which there are redirects in netlify.yml. Other changes: * Some existing links have been fixed to reference the `.md` file rather than the resultant URL, since otherwise mkdocs doesn't realise it's an internal link and performs no validation. (Though all links under `packages/` have to stay as absolute links, since the READMEs need to work standalone when published to NPM.) * The duplicated content between `packages/*/README.md` and `docs/packages/*` has been resolved by making the latter symlink to the former. Fixes #271. Fixes #620. Fixes #60. Refs #892.
Now deployed at: |
After the recent Gitbook hosted beta bugs & lack of ability to customise, we're going to try using the static site generator mkdocs, along with the mkdocs-material theme:
http://www.mkdocs.org/
https://squidfunk.github.io/mkdocs-material/
The site will be hosted by Netlify, with each version of the docs being built from the respective branch, and served on different subdomains.
Notable changes with mkdocs-material compared to Gitbook:
index.md
notREADME.md
api.md
becomes/api/
, which makes the extra directory nesting for just one file (egapi/index.md
) unnecessary.Other changes:
.md
file rather than the resultant URL, since otherwise mkdocs doesn't realise it's an internal link and performs no validation. (Though all links underpackages/
have to stay as absolute links, since the READMEs need to work standalone when published to NPM.)packages/*/README.md
anddocs/packages/*
has been resolved by making the latter symlink to the former.Fixes #271.
Fixes #620.
Fixes #60.
Refs #892.