Build Status


Example mdBook website using GitLab Pages.

Learn more about GitLab Pages at https://pages.gitlab.io and the official documentation https://docs.gitlab.com/ce/user/project/pages/.


GitLab CI

This project's static Pages are built by GitLab CI, following the steps defined in .gitlab-ci.yml:

# requiring the environment of Rust 1.42.0
image: rust:1.42.0

before_script:
  - wget -qO- https://github.com/rust-lang/mdBook/releases/download/v0.3.7/mdbook-v0.3.7-x86_64-unknown-linux-gnu.tar.gz | tar -xvz -C /usr/local/bin
  - chmod 0755 /usr/local/bin/mdbook
    
# the 'pages' job will build your site and deploy if on master
pages:
  stage: deploy
  script:
    - mdbook build $([ "$CI_COMMIT_BRANCH" = "master" ] && echo "-d public") # build to public path on master
  artifacts:
    paths:
      - public
      - book
    expire_in: 1 day

Building locally

To work locally with this project, you'll have to follow the steps below:

  1. Fork, clone or download this project
  2. Install mdBook
  3. Preview your project: mdbook serve
  4. Add content
  5. Generate the website: mdbook build (optional)
  6. Push your changes to the master branch: git push

Read more at mdbook's documentation.

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 and project Pages.

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.


Forked from @bamhm182