Skip to content

Commit 859c332

Browse files
authored
Merge pull request #13 from r-devel/quarto
Convert site to Quarto
2 parents 23af937 + 8a333d7 commit 859c332

File tree

40 files changed

+527
-1151
lines changed

40 files changed

+527
-1151
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ Gemfile.lock
66
.Rhistory
77
*.Rproj
88
**.DS_Store
9+
10+
/.quarto/

Gemfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.html

Lines changed: 0 additions & 329 deletions
This file was deleted.

README.md

Lines changed: 26 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,58 @@
11
# Source for [R Contributor Site](https://contributor.r-project.org/)
22

3+
The website is built with [Quarto](https://quarto.org)
4+
35
## Website structure
46

5-
The top-level pages linked in the menu are in correspondingly named markdown files, e.g.
7+
The top-level pages linked in the menu are in correspondingly named .qmd files, e.g.
68

79
| Menu item | Markdown file | Relative URL |
810
|-------------|---------------|--------------|
9-
| Home | `index.md` | `/` |
10-
| Slack Group | `slack.md` | `/slack` |
11+
| Home | `index.qmd` | `/` |
12+
| Slack Group | `slack.qmd` | `/slack` |
1113

12-
You can create sub-pages by creating a folder with an `index.md` file. Any further markdown pages within that folder will be sub-pages under that, e.g.
14+
You can create sub-pages by creating a folder with an `index.qmd` file.
15+
Any further markdown pages within that folder will be sub-pages under that, e.g.
1316

1417
| Markdown file | Relative URL |
1518
|---------------|---------------|
16-
|`translating-r-to-your-language/index.md` | `/translating-r-to-your-language` |
17-
|`translating-r-to-your-language/prep.md` | `/translating-r-to-your-language/prep` |
19+
|`translating-r-to-your-language/index.qmd` | `/translating-r-to-your-language` |
20+
|`translating-r-to-your-language/prep.qmd` | `/translating-r-to-your-language/prep` |
1821

1922
## Basic editing
2023

21-
You can edit the markdown files on the `main` branch and the changes will be automatically deployed to the live site once the changes are committed. If you edit the files directly on GitHub using the browser editor, then you can use the Preview tab to check the formatting before committing.
24+
You can edit the .qmd files on the `main` branch and the changes will be automatically deployed to the live site once the changes are committed. If you edit the files directly on GitHub using the browser editor, then you can use the Preview tab to check the formatting before committing.
2225

2326
## Substantial editing
2427

2528
If you are making substantial changes, e.g. adding a new page, or making changes that require collaborating editing/review before being pushed, create a branch and make the changes there.
2629

27-
Any changes pushed to a different branch will not be automatically deployed to preview. so if the GitHub editor preview is not sufficient (i.e. you are doing more than editing a single page) it is best to clone the repo and make your changes locally.
30+
Any changes pushed to a different branch will not be automatically deployed to preview, so if the GitHub editor preview is not sufficient (i.e. you are doing more than editing a single page) it is best to clone the repo and make your changes locally.
2831

2932
### Previewing locally
3033

31-
To preview the site locally, you will need to install Jekyll, see https://jekyllrb.com/docs/ for installation instructions for common operating systems.
34+
To preview the site locally, you will need to install Quarto, see https://quarto.org/docs/get-started/.
3235

33-
To build the site and make it available on a local server, run the following command in a terminal from the top level directory of the locally cloned repository.
36+
To build the site and make it available on a local server, run the following command in a terminal from the top level directory of the locally cloned repository:
3437

3538
```
36-
bundle exec jekyll serve
39+
quarto preview
3740
```
3841

39-
If you use RStudio, you can open this `README.md` file and use `Ctrl/Cmd + Alt + Enter` to send the above line to the terminal.
40-
41-
Open http://localhost:4000 in your browser to preview the site. The site is repeatedly rebuilt, so if you make changes to the markdown files and save them, you should see the changes straight-away. Use `Ctrl/Cmd + C` to stop locally serving the site.
42-
43-
You will need to restart the server if you add/remove items from the menu.
44-
4542
### Creating pages
4643

4744
Please use the following YAML fields when creating new pages:
4845

4946
---
47+
title: The title
5048
description: Short description, less than 160 characters.
51-
layout: custom
49+
image: your-image.png
5250
---
51+
52+
The description is used to create cards when sharing links on social media but will not appear on the page itself.
5353

54-
The layout should always be `custom`.
55-
The description is used to create cards when sharing links on social media.
56-
The title and image (including alternative text) are automatically taken from the page content, using the first `<h1>` header and image respectively.
57-
The image file should be in the same directory as the markdown file.
54+
If you don't specify an image in the YAML, an the first image on the page will be used as the image for social media cards (including alternative text).
55+
The image file should be in the same directory as the .qmd file.
5856
JPG, PNG, WEBP and GIF formats are supported (only the first frame of an animated GIF will be used).
5957

6058
You can check how the card will look using the following validators:
@@ -70,34 +68,23 @@ as that property is not required.
7068

7169
### Editing the menu
7270

73-
To edit the menu you need to edit the `navigation` field of `_config.yml`.
71+
To edit the menu you need to edit the `navbar` field of `_quarto.yml`.
7472

7573
To add a new page, add a new element with the title and URL of the page. Use the relative URL for pages in this repo, e.g.
7674

7775
```
78-
- title: Slack Group
79-
url: slack
76+
- text: Slack Group
77+
file: slack.qmd
8078
```
8179

8280
Use the full URL for external pages, e.g.
8381

8482
```
85-
- title: R Developer Page
86-
url: https://developer.r-project.org/
83+
- text: R Developer Page
84+
href: https://developer.r-project.org/
8785
```
8886

89-
Like any change to `config.yml`, you will need to restart the Jekyll server for
90-
the change to take effect (when previewing locally).
91-
9287
## Website theme
9388

94-
This is a GitHub pages site, using the [modified minimal Jekyll theme](https://github.com/kbsezginel/gh-pages-template) by [kbsezginel](https://github.com/kbsezginel). The [theme documentation](https://kbsezginel.github.io/gh-pages-template/setup) provides instructions for initial setup and customization, which are probably not required for day-to-day editing.
95-
96-
### Jekyll/Liquid notes
97-
98-
* `| relative.url` filter will make path relative (add `/` at beginning if necessary)
99-
* `| absolute.url` filter will add the site domain at the start
100-
101-
## Icons
89+
This is a GitHub pages site, using the R Contributor [brand.yml](https://posit-dev.github.io/brand-yml/) files: `brand-light.yml` and `brand-dark.yml` for light and dark mode respectively.
10290

103-
Some icons obtained from https://uxwing.com.

_config.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

_extensions/mcanouil/iconify/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Mickaël Canouil
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
title: Iconify
2+
author: Mickaël Canouil
3+
version: 3.0.0
4+
quarto-required: ">=1.5.57"
5+
contributes:
6+
shortcodes:
7+
- iconify.lua

_extensions/mcanouil/iconify/iconify-icon.min.js

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)