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/.
# 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
To work locally with this project, you'll have to follow the steps below:
- Fork, clone or download this project
- Install mdBook
- Preview your project:
- Add content
- Generate the website:
- Push your changes to the master branch:
Read more at mdbook's documentation.
To use this project as your user/group website, you will need one additional
step: just rename your project to
groupname. This can be done by navigating to your
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