Skip to content
Snippets Groups Projects
Commit 30779572 authored by Sam Beckham's avatar Sam Beckham
Browse files

Update README.md

parent 7e28c54d
No related branches found
No related tags found
No related merge requests found
# VuePress GitLab pages template
![Build Status](https://gitlab.com/samdbeckham/vuepress-gl-pages/badges/master/build.svg)
This repo contains all the starter files for running VuePress on GitLab pages.
If you want to read more on VuePress, [check out their website](https://vuepress.vuejs.org/).
---
## Running locally
Example [VuePress][project] website using GitLab Pages.
This project uses [yarn](), you'll need to install this globally before you can get started.
Learn more about GitLab Pages at https://pages.gitlab.io and the official
documentation https://docs.gitlab.com/ce/user/project/pages/.
---
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [GitLab CI](#gitlab-ci)
- [Building locally](#building-locally)
- [GitLab User or Group Pages](#gitlab-user-or-group-pages)
- [Did you fork this project?](#did-you-fork-this-project)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## GitLab CI
This project's static Pages are built by [GitLab CI][ci], following the steps
defined in [`.gitlab-ci.yml`](.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 sebsequent builds.
## Building locally
This project uses [yarn](https://yarnpkg.com), you'll need to install this globally before you can get started.
```
npm install -g yarn
......@@ -24,13 +70,32 @@ To run the local dev server just use the following command:
yarn start
```
## Building the site
Your website should be available at [http://localhost:8080/vuepress]
[.gitlab-ci.yml](./.gitlab-ci.yml) takes care of the deployment to GitLab pages.
If you want to preview a build locally, you can run:
*Read more at VuePress' [documentation][].*
```
yarn build
```
## GitLab User or Group Pages
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][userpages] and [project Pages][projpages].
## Did you fork this project?
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.
[ci]: https://about.gitlab.com/gitlab-ci/
[project]: https://vuepress.vuejs.org/
[install]: https://vuepress.vuejs.org/guide/getting-started.html
[documentation]: https://vuepress.vuejs.org/guide/
[userpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#user-or-group-pages
[projpages]: https://docs.gitlab.com/ce/user/project/pages/introduction.html#project-pages
----
This will build all your files into a `./public` directory.
\ No newline at end of file
Forked from @samdbeckham
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment