Example VuePress website using GitLab Pages.
Learn more about GitLab Pages at https://about.gitlab.com/product/pages and the official documentation https://docs.gitlab.com/ee/user/project/pages/.
Table of Contents generated with DocToc
This project's static Pages are built by GitLab CI, following the steps
defined in .gitlab-ci.yml
:
image: node:9.11.1
pages:
cache:
paths:
- node_modules/
script:
- yarn install
- yarn build
artifacts:
paths:
- public
only:
- master
This sets up a node9.11.1
environment, then uses yarn install
to install dependencies and yarn build
to build out the website to the ./public
directory.
It also caches the node_modules
directory to speed up subsequent builds.
This project uses yarn, you'll need to install this globally before you can get started.
npm install -g yarn
Then you need to install the project dependencies:
yarn install
Now you're ready to go. To run the local dev server just use the following command:
yarn start
Your website should be available at [http://localhost:8080/vuepress]
Read more at VuePress' documentation.
To use this project as your user/group website, you will need one additional
step: just rename your project to namespace.gitlab.io
, where namespace
is
your username
or groupname
. This can be done by navigating to your
project's Settings.
Read more about user/group Pages and project Pages.
You'll need to set the correct base in docs/.vuepress/config.js.
If you are deploying to https://.gitlab.io/, you can omit base as it defaults to "/".
If you are deploying to https://.gitlab.io//, (i.e. your repository is at https://gitlab.com//), set base to "//".
If you forked this project for your own use, please go to your project's Settings and remove the forking relationship, which won't be necessary unless you want to contribute back to the upstream project.
Forked from @samdbeckham