Commit ffda943a authored by Romain Lesur's avatar Romain Lesur
Browse files

Add references

parent df3f9203
Pipeline #11794536 passed with stage
in 2 minutes and 22 seconds
......@@ -36,3 +36,6 @@ vignettes/*.pdf
# Book directory
_book
# Package bibliography
packages.bib
---
title: "Easily publish a R bookdown book with GitLab Pages"
author: "Romain Lesur"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
documentclass: book
bibliography: packages.bib
biblio-style: apalike
link-citations: yes
output:
bookdown::gitbook: default
bookdown::gitbook:
config:
toc:
before: |
<li><strong>Contents</strong></li>
after: |
<li><a href="https://gitlab.com/RLesur/bookdown-gitlab-pages">
See the source</a></li>
download: "pdf"
bookdown::pdf_book: default
---
# Overview
# Overview {-}
Publishing a [`R`](https://www.r-project.org/) [`bookdown`](https://bookdown.org/) book with [`GitLab Pages`](https://docs.gitlab.com/ee/user/project/pages/index.html) is as easy as:
```{r include=FALSE}
knitr::write_bib(c(.packages(), 'bookdown'), 'packages.bib')
```
Publishing a `R` [@R-base] `bookdown` [@R-bookdown] book with [`GitLab Pages`](https://docs.gitlab.com/ee/user/project/pages/index.html) is as easy as:
- hosting a repository on [`GitLab`](https://gitlab.com)
- adding a configuration file to the project
## Host a `bookdown` project on [`GitLab`](https://gitlab.com)
## Host a `bookdown` project on [`GitLab`](https://gitlab.com) {-}
As [`GitHub`](https://www.github.com), [`GitLab`](https://gitlab.com) is a web-based [`Git`](https://git-scm.com/) repository manager. Creating a new project on [`GitLab`](https://gitlab.com) is fairly intuitive for [`GitHub`](https://www.github.com) users.
As [`GitHub`](https://www.github.com), [`GitLab`](https://gitlab.com) is a web-based [`Git`](https://git-scm.com/) repository manager. Creating a new project on [`GitLab`](https://gitlab.com) is fairly intuitive for [`GitHub`](https://www.github.com) users. [`GitLab`](https://gitlab.com) users can create unlimitate private projects for free (see [here](https://about.gitlab.com/gitlab-com/)).
[`GitLab`](https://gitlab.com) also offers a continuous integration service ([`GitLab CI`](https://docs.gitlab.com/ee/ci/quick_start/)) and a static websites hosting service ([`GitLab Pages`](https://about.gitlab.com/features/pages/)).
[`GitLab`](https://gitlab.com) also offers a continuous integration service ([`GitLab CI`](https://docs.gitlab.com/ee/ci/quick_start/)) and a static websites hosting service ([`GitLab Pages`](https://about.gitlab.com/features/pages/)) in its free plan ^[CI pipelines are limited to 2,000 minutes per month].
## Add a `GitLab CI` configuration file to your project
## Add a `GitLab CI` configuration file {-}
Add the following `.gitlab-ci.yml` file in the root of the project:
```{r comment=NA, class.output='yml', echo=FALSE}
cat(readChar("./.gitlab-ci.yml", 1e5))
```
## Read the book
## Read the book {-}
When the job is done, the book is served on `GitLab Pages`.
......@@ -36,5 +52,4 @@ Job status can be found in `CI / CD` menu > `Jobs`. An example, [here](https://g
The address of the `GitLab Pages` project can be found in `Settings` > `Pages`. An example, [here](https://gitlab.com/RLesur/bookdown-gitlab-pages/pages).
Source of this `bookdown` book: https://gitlab.com/RLesur/bookdown-gitlab-pages
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment