-
Notifications
You must be signed in to change notification settings - Fork 2
Usage
If you want to render the slides locally, you need to install the following tools:
Then, clone your new repository.
Tip
You can easily clone your new repository by following these steps in RStudio Desktop:
- open RStudio Desktop
- click on New Project
- select Version control
- select Git
- paste the URL of your repository
- check the name of the folder (same as the repository)
- select the location on your drive in which your repository will be cloned
Before starting writing your new presentation, you have to change the content of some files.
-
CONTRIBUTING.md
- change the URL of the repository in several places
- change the email of the maintainer of the repository
-
CODE_OF_CONDUCT.md
- change the email of the maintainer of the repository
-
_quarto.yml
- change the title of the presentation in the tags
title
andpagetitle
- change the title of the presentation in the tags
-
index.qmd
- change the URL of the repository in the tag
footer
- change the path to your own
.scss
style in the tagstyle
(if needed)
- change the URL of the repository in the tag
-
sections/title-slide.qmd
- change the title of the presentation (inside
::: {.title}
and:::
) - change the subtitle of the presentation (inside
::: {.subtitle}
and:::
) - change first author name and social links (inside
::: {.column .author width="32%"}
and:::
) - change first author affiliation (inside
::: {.column .affiliation width="32%"}
and:::
) - add additional authors (up to two)
- change the title of the presentation (inside
-
images/logo-title-slide.png
- replace (but keep the same file name) this file to use your own image in the title slide
-
images/logo-affiliation.png
- replace (but keep the same file name) this file to use your own image in the slide footer
-
README.md
- remove the first chunk (link to this wiki)
- change the name of the GitHub account (
rdatatoolbox
) in several places - change the name of the repository (
quarto-template
) in several places - change the title, subtitle and image of the repository after
<!-- Logo & Title -->
- edit the section Citation (after
## Citation
) - remove or edit the section Acknowledgments (after
## Acknowledgments
) - modify other sections as you want
-
images/readme/logo-readme.png
- replace (but keep the same file name) this file to use your own image in the README
-
images/wiki/
- delete this folder (only used for this Wiki)
Note
If you want to use a different license (default is CC BY 4.0), you have to:
- change the content of the
LICENSE.md
file (visit the website choosealicense) - use a different license badge in the
README.md
- change the license name and icon in the tag
footer
of theindex.qmd
File organization
The Quarto template splits the presentation into sections (.qmd
files stored in sections/
). You can create as many sections as you like. You have to link a new section in the index.qmd
as follow:
```{r}
#| child: "sections/new-section.qmd"
```
Alternatively, you can copy the content of all qmd
files of the sections/
folder inside the index.qmd
and delete the sections/
folder. But working with child documents makes easier the writing process, especially if you have a long presentation or want to reuse some slides.
Theme
If you want to modify the default theme, change the content of the styles/main.scss
file. Alternatively, you can create your own theme in a different scss
file stored in styles/
and add a link to this file in the index.qmd
:
theme: [default, "styles/new-theme.scss"]
Quarto syntax
If you are not familiar with the Quarto and RMarkdown syntax, you can have a look at the Quarto Guide.
To locally render the slides, open the index.qmd
in RStudio and click on the button Render. This will create an index.html
containing your presentation. Open the index.html
in your favorite web browser to see your slides.
Caution
Do not render the child documents (.qmd
files stored in sections/
). You have to render only the index.qmd
.
Presentation files (index.html
and index_files/
) are listed in the .gitignore
to keep the main
branch clean. Your online presentation will be generated by a GitHub Action that will automatically convert the index.qmd
into an index.html
and push presentation files on the gh-pages branch. This action is triggered after a push on the main
branch.
After a few minutes, your online presentation will be available at: https://__ghaccount__.github.io/__reponame__
, where __ghaccount__
is your GitHub account (or GitHub organization) and __reponame__
your repository name.
Tip
You can disable the trigger of this action by adding [no ci]
in your commit message. This can be interesting if you modify non Quarto files (e.g. README.md
, CONTRIBUTING.md
and CODE_OF_CONDUCT.md
).
For instance: git commit -m "edit README [no ci]"
.