Merge PR #2371: how to build docs locally

This commit is contained in:
Zach
2018-09-21 20:37:42 -04:00
committed by Rigel
parent e2da4caae4
commit 0ac0301467
4 changed files with 36 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
export default ({ router }) => {
router.addRoutes([{ path: "/testnet/", redirect: "/" }])
}
+4
View File
@@ -0,0 +1,4 @@
$accentColor = #304DE9
$textColor = #15192C
$borderColor = #eaecef
$codeBgColor = #282c34
+29 -4
View File
@@ -24,7 +24,7 @@ on the website.
## Config.js
The [config.js](./config.js) generates the sidebar and Table of Contents
The [config.js](./.vuepress/config.js) generates the sidebar and Table of Contents
on the website docs. Note the use of relative links and the omission of
file extensions. Additional features are available to improve the look
of the sidebar.
@@ -59,9 +59,34 @@ to send users to the GitHub.
## Building Locally
Not currently possible but coming soon! Doing so requires
assets held in the (private) website repo, installing
[VuePress](https://vuepress.vuejs.org/), and modifying the `config.js`.
To build and serve the documentation locally, run:
```
npm install -g vuepress
```
then change the following line in the `config.js`:
```
base: "/docs/",
```
to:
```
base: "/",
```
Finally, go up one directory to the root of the repo and run:
```
# from root of repo
vuepress build docs
cd dist/docs
python -m SimpleHTTPServer 8080
```
then navigate to localhost:8080 in your browser.
## Consistency