Skip to content

Commit 32bba73

Browse files
Alison Presmanes Hillcderv
Alison Presmanes Hill
andauthored
Adding pkgdown site built by GHA (#1028)
Co-authored-by: christophe dervieux <[email protected]>
1 parent aaf1d44 commit 32bba73

23 files changed

+616
-17
lines changed

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ inst/resources/gitbook/js/app.min.js.map
1010
.*/rsconnect
1111
^\.github$
1212
^NEWS\.md$
13+
^vignettes/articles$
14+
^_pkgdown\.yml$
15+
^reference$
16+
^pkgdown$

.github/CODE_OF_CONDUCT.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards
42+
of acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies
54+
when an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail
56+
address, posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at [INSERT CONTACT
63+
METHOD]. All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.0,
118+
available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
119+
120+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
121+
enforcement ladder](https://github.com/mozilla/diversity).
122+
123+
[homepage]: https://www.contributor-covenant.org
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

.github/CONTRIBUTING.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
We welcome contributions to the **bookdown** package. To submit a contribution:
1+
# Contributing to bookdown
22

3-
1. [Fork](https://github.com/rstudio/bookdown/fork) the repository and make your changes, or just edit a file in this repository using the `Edit` button on Github if the change is simple enough.
3+
We welcome contributions to the **bookdown** package.
44

5-
2. Ensure that you have signed the [individual](http://www.rstudio.com/wp-content/uploads/2014/06/RStudioIndividualContributorAgreement.pdf) or [corporate](http://www.rstudio.com/wp-content/uploads/2014/06/RStudioCorporateContributorAgreement.pdf) contributor agreement as appropriate. You can send the signed copy to [email protected].
5+
You can contribute in many ways:
66

7-
3. Submit a [pull request](https://help.github.com/articles/using-pull-requests).
7+
* By opening issues to give feedback and share ideas.
8+
* By fixing typos in documentations
9+
* By submitting Pull Request (PR) to fix some opened issues
10+
* By submitting Pull Request (PR) to suggest some new features. (It is considered good practice to open issues before to discuss ideas)
11+
12+
13+
## To submit a contribution using a Pull Request:
14+
15+
1. [Fork](https://github.com/rstudio/bookdown/fork) the repository and make your changes in a new branch specific to the PR. It is ok to edit a file in this repository using the `Edit` button on Github if the change is simple enough.
16+
17+
2. For significant changes (e.g not required for fixing typos), ensure that you have signed the [individual](https://rstudioblog.files.wordpress.com/2017/05/rstudio_individual_contributor_agreement.pdf) or [corporate](https://rstudioblog.files.wordpress.com/2017/05/rstudio_corporate_contributor_agreement.pdf) contributor agreement as appropriate. You can send the signed copy to <[email protected]>.
18+
19+
3. Submit the [pull request](https://help.github.com/articles/using-pull-requests). It is ok to submit as draft in your are still working on it but would like some feedback from us. It always good to share in the open that you are working on it.
820

921
We'll try to be as responsive as possible in reviewing and accepting pull requests. Appreciate your contributions very much!

.github/workflows/pkgdown.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
11+
name: pkgdown
12+
13+
jobs:
14+
pkgdown:
15+
if: ${{ github.event_name == 'push' || startsWith(github.head_ref, 'pkgdown/') }}
16+
runs-on: ubuntu-18.04
17+
env:
18+
RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest
19+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: r-lib/actions/setup-r@v1
24+
id: install-r
25+
26+
- uses: r-lib/actions/setup-pandoc@v1
27+
28+
- name: Install pak and query dependencies
29+
run: |
30+
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
31+
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
32+
shell: Rscript {0}
33+
34+
- name: Cache R packages
35+
uses: actions/cache@v2
36+
with:
37+
path: ${{ env.R_LIBS_USER }}
38+
key: ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
39+
restore-keys: ${{ runner.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-
40+
41+
- name: Install system dependencies
42+
if: runner.os == 'Linux'
43+
run: |
44+
pak::local_system_requirements(execute = TRUE)
45+
pak::pkg_system_requirements("pkgdown", execute = TRUE)
46+
shell: Rscript {0}
47+
48+
- name: Install package and dependencies
49+
run: |
50+
pak::local_install_dev_deps(upgrade = TRUE)
51+
pak::pkg_install("r-lib/pkgdown")
52+
pak::pkg_install("apreshill/quillt")
53+
shell: Rscript {0}
54+
55+
- name: Install package
56+
run: R CMD INSTALL .
57+
58+
- name: Build pkgdown site
59+
run: pkgdown::build_site(new_process = FALSE)
60+
shell: Rscript {0}
61+
62+
- name: Deploy to Netlify
63+
id: netlify-deploy
64+
uses: nwtgck/[email protected]
65+
with:
66+
publish-dir: 'reference'
67+
production-branch: master
68+
github-token: ${{ secrets.GITHUB_TOKEN }}
69+
deploy-message:
70+
'Deploy from GHA: ${{ github.event.head_commit.message }} (${{ github.sha }})'
71+
enable-pull-request-comment: false
72+
enable-commit-comment: false
73+
enable-commit-status: true
74+
alias: deploy-preview-${{ github.event.number }}
75+
env:
76+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
77+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
**/rsconnect/
55
.DS_Store
66
**/*.min.js.map
7+
reference

DESCRIPTION

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,14 @@ Suggests:
8080
tufte,
8181
xml2,
8282
webshot
83-
URL: https://github.com/rstudio/bookdown
83+
URL: https://github.com/rstudio/bookdown, https://pkgs.rstudio.com/bookdown/
8484
BugReports: https://github.com/rstudio/bookdown/issues
85-
Remotes:
86-
rstudio/bslib,
87-
rstudio/rmarkdown,
88-
r-lib/downlit
8985
SystemRequirements: Pandoc (>= 1.17.2)
9086
LazyData: TRUE
9187
RoxygenNote: 7.1.1
9288
Encoding: UTF-8
89+
VignetteBuilder: knitr
90+
Remotes:
91+
rstudio/bslib,
92+
rstudio/rmarkdown,
93+
r-lib/downlit

README.md

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# bookdown
1+
# bookdown <img src='man/figures/logo.png' align="right" height="139" />
22

33

44
<!-- badges: start -->
55
[![R-CMD-check](https://github.com/rstudio/bookdown/workflows/R-CMD-check/badge.svg)](https://github.com/rstudio/bookdown/actions)
6-
[![Build Status](https://travis-ci.com/rstudio/bookdown.svg?branch=master)](https://travis-ci.com/rstudio/bookdown)
7-
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/bookdown)](https://cran.r-project.org/package=bookdown)
6+
[![CRAN release](https://www.r-pkg.org/badges/version/bookdown)](https://CRAN.R-project.org/package=bookdown)
7+
[![Codecov test coverage](https://codecov.io/gh/rstudio/bookdown/branch/master/graph/badge.svg)](https://codecov.io/gh/rstudio/bookdown?branch=master)
88
<!-- badges: end -->
99

1010

11-
<a href="https://bookdown.org/yihui/bookdown"><img src="https://bookdown.org/yihui/bookdown/images/logo.png" alt="bookdown logo" align="right" /></a>
12-
1311
A open-source (GPL-3) R package to facilitate writing books and long-form articles/reports with R Markdown. Features include:
1412

1513
- Generate printer-ready books and ebooks from R Markdown documents
@@ -22,4 +20,45 @@ A open-source (GPL-3) R package to facilitate writing books and long-form articl
2220
- Integrated with the RStudio IDE
2321
- One-click publishing to <https://bookdown.org>
2422

25-
The full documentation is the **bookdown** book, freely available at <https://bookdown.org/yihui/bookdown>. You may see "Get Started" at <https://bookdown.org/home/about/> to know how to get started with writing a book. The source of the **bookdown** book (and a complete working example) can be found in [inst/examples/](https://github.com/rstudio/bookdown/tree/master/inst/examples) of this repo. See <https://bookdown.org> for more information and featured books. You are welcome to send us feedback using [Github issues](https://github.com/rstudio/bookdown/issues) or ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/bookdown) with the `bookdown` tag.
23+
## Book
24+
25+
<a href="https://bookdown.org/yihui/bookdown/"><img src="https://bookdown.org/yihui/bookdown/images/cover.jpg" alt = "bookdown: Authoring Books and Technical Documents with R Markdown" height="400"></a>
26+
27+
## Installation
28+
29+
You can install the package from CRAN as follows:
30+
31+
```r
32+
install.packages("bookdown")
33+
```
34+
35+
If you want to use the development version of the **bookdown** package, you can install the package from GitHub via the [**remotes** package](https://remotes.r-lib.org):
36+
37+
```r
38+
remotes::install_github('rstudio/bookdown')
39+
```
40+
41+
## Usage
42+
43+
The easiest way to start a new Bookdown project is from within RStudio IDE. Go to _File > New Project > New Directory > Book project using bookdown_.
44+
45+
This will create a new directory with an example book as template. You can build the HTML version of this example book without doing any modification:
46+
47+
* Go into the Build Pane in the RStudio IDE
48+
* Click on _Build Book > bookdown::gitbook_
49+
50+
You can also run `bookdown::render_book()` in the R console.
51+
52+
Learn more about using bookdown in the [Getting started section](https://pkgs.rstudio.com/bookdown/articles/bookdown.html).
53+
54+
## Getting help
55+
56+
There are two main places to get help:
57+
58+
1. The [RStudio community](https://community.rstudio.com/tags/c/R-Markdown/10/bookdown) is a friendly place to ask any questions about **bookdown**. Be sure to use the `bookdown` tag.
59+
60+
1. [Stack Overflow](https://stackoverflow.com/questions/tagged/bookdown) is a great source of answers to common **bookdown** questions. Use the tags [`[r][bookdown]`](https://stackoverflow.com/questions/tagged/bookdown+r) if you ask a question.
61+
62+
## Code of Conduct
63+
64+
Please note that the bookdown project is released with a [Contributor Code of Conduct](https://pkgs.rstudio.com/bookdown/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

0 commit comments

Comments
 (0)