Vue-Styleguidist can generate a static website. To deploy it, follow this short intro and choose one of the providers.
# Pre-requisitesFirst, specify the location where the styleguide site is going to be built using the styleguideDir option. It will default to a styleguide
folder beside your styleguide.config.js
.
Check out the results of running the following command
Now, you should have a directory containing HTML and javascript. Let's deploy it.
# Deploy on Netlify (opens new window)vue-styleguidist build
styleguide
if you have styleguide.config.js
at the root of your repository and left out the option. If you changed the styleguideDir
option, pick the new path chosen.Connect your GitHub account with Zeit.
Create a now.json
file at the root of your repository containing
And make sure to prepare a "build-now"
script in your package.json
that builds the styleguide
Adjust the distDir
config according to your styledguideDir option.
Github Pages (opens new window) can be very useful to serve static websites. It needs a little more effort than Netlify. It uses your repository files as the static pages themselves.
yourgithubid.github.io
. Replace yourgithubid by your github id.Settings > Options > Github Pages
styleguidist build
.yourgithubid.github.io
repository the contents of your styleguide
folder.Zeit and Netlify simplify your website deployment automation. If you are going with GitHub pages though, because it is free for instance, you might want to build automation yourself.
This is how the very documentation you are reading is deployed automatically
# Deploy on surge.shRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4