Skip to content

Commit 0de750c

Browse files
committed
Update docs with platforms key.
1 parent 4f804a9 commit 0de750c

6 files changed

Lines changed: 120 additions & 26 deletions

docs/_quarto.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ website:
2525
href: qsupport-this-multi-links-and-gh-users.qmd
2626
- text: "FUNDING.yml Integration"
2727
href: qsupport-this-funding-yml.qmd
28+
- text: "RevealJS Integration"
29+
href: qsupport-this-revealjs.qmd
2830
- section: "Support"
2931
contents:
3032
- text: "FAQ"

docs/index.qmd

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ format:
66
extensions:
77
support-this:
88
heading: "Support This Project" # Optional custom title
9-
message: "Your support helps keep this project alive!" # Optional message
10-
github: coatless
11-
patreon: coatless
9+
description: "Your support helps keep this project alive!" # Optional message
1210
use_funding_yml: false
1311
position: top
12+
platforms:
13+
github: coatless
14+
patreon: coatless
1415
filters: [support-this]
1516
---
1617

@@ -50,13 +51,14 @@ format:
5051
extensions:
5152
support-this:
5253
heading: "Support This Project" # Optional custom title
53-
message: "Your support helps keep this project alive!" # Optional message
54-
github: username
55-
patreon: username
56-
ko_fi: username
57-
buy_me_a_coffee: username
58-
custom: "https://paypal.me/username"
54+
description: "Your support helps keep this project alive!" # Optional message
5955
use_funding_yml: false # Set to true to use GitHub FUNDING.yml if available
56+
platforms:
57+
github: username
58+
patreon: username
59+
ko_fi: username
60+
buy_me_a_coffee: username
61+
custom: "https://paypal.me/username"
6062
filters: [support-this]
6163
---
6264
```
@@ -65,7 +67,7 @@ where `username` should be replaced with your actual usernames on the respective
6567

6668
## Supported Platforms
6769

68-
The following platforms are supported. Use the corresponding key followed by your username or URL:
70+
The following platforms are supported under the `platforms` key. Use the corresponding key followed by your username or URL:
6971

7072
- GitHub Sponsors: `github: username`
7173
- Patreon: `patreon: username`
@@ -87,10 +89,11 @@ You can specify multiple accounts for any platform:
8789
```yaml
8890
extensions:
8991
support-this:
90-
github: [user1, user2, user3]
91-
custom:
92-
- "https://paypal.me/username"
93-
- "https://venmo.com/username"
92+
platforms:
93+
github: [user1, user2, user3]
94+
custom:
95+
- "https://paypal.me/username"
96+
- "https://venmo.com/username"
9497
```
9598

9699
Each account will be displayed as a separate link.
@@ -100,7 +103,7 @@ Each account will be displayed as a separate link.
100103
The `support-this` extension supports the following configuration options:
101104

102105
- `heading`: Custom title for the support section (default: "Support This Work")
103-
- `message`: Custom message to display above the links
106+
- `description`: Custom message to display above the links
104107
- `truncated`: If true, shows only icons without text labels (default: false)
105108
- `use_funding_yml`: If true, attempts to read GitHub's FUNDING.yml for funding links (default: false)
106109

docs/qsupport-this-demo.qmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ format:
55
pdf: default
66
extensions:
77
support-this:
8+
display: badge
89
heading: "Support My Work"
910
message: "If you find this helpful, consider supporting me!"
10-
github: coatless
11-
patreon: coatless
12-
buy_me_a_coffee: coatless
11+
platforms:
12+
github: coatless
13+
patreon: coatless
14+
buy_me_a_coffee: coatless
1315
filters: [support-this]
1416
---
1517

docs/qsupport-this-multi-links-and-gh-users.qmd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ format: html
44
extensions:
55
support-this:
66
heading: "Support My Work"
7-
github: [coatless, yourusername]
8-
custom:
9-
- "https://paypal.me/yourusername"
10-
- "https://yourwebsite.com/donate"
7+
platforms:
8+
github: [coatless, yourusername]
9+
custom:
10+
- "https://paypal.me/yourusername"
11+
- "https://yourwebsite.com/donate"
1112
filters: [support-this]
1213
---
1314

@@ -24,10 +25,11 @@ The configuration specified in the YAML front matter is as follows:
2425
extensions:
2526
support-this:
2627
heading: "Support My Work"
27-
github: [coatless, yourusername]
28-
custom:
29-
- "https://paypal.me/yourusername"
30-
- "https://yourwebsite.com/donate"
28+
platforms:
29+
github: [coatless, yourusername]
30+
custom:
31+
- "https://paypal.me/yourusername"
32+
- "https://yourwebsite.com/donate"
3133
```
3234
3335
You may use either a single string or a list of strings for the `github` and `custom`
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "RevealJS Support-This"
3+
format: revealjs
4+
extensions:
5+
support-this:
6+
display: "icon-username"
7+
heading: "Support This Project"
8+
description: "Consider supporting our work!"
9+
position: bottom
10+
debug: true
11+
platforms:
12+
github: coatless
13+
patreon: coatless
14+
ko_fi: coatless
15+
filters: [support-this]
16+
---
17+
18+
## Introduction
19+
20+
This is a RevealJS presentation testing the support-this extension.
21+
22+
## Support-This Integration
23+
24+
When rendered as a RevealJS presentation, the extension automatically:
25+
26+
1. Detects RevealJS format
27+
2. Creates a non-titled slide (e.g. empty `##`)
28+
3. Adds support links
29+
4. Places at end of presentation (can be configured)
30+
31+
## Example Configuration
32+
33+
```yaml
34+
extensions:
35+
support-this:
36+
platforms:
37+
github: username
38+
patreon: username
39+
```
40+
41+
## More Content
42+
43+
This is just a demo slide.
44+
45+
Navigate to the last slide to see the support section!
46+

docs/qsupport-this-revealjs.qmd

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "RevealJS Support-This"
3+
format: html
4+
---
5+
6+
This document demonstrates the `support-this` Quarto extension within a RevealJS presentation.
7+
8+
## Presentation
9+
10+
Open presentation in a new tab: [qsupport-this-revealjs-slides.qmd](qsupport-this-revealjs-slides.qmd)
11+
12+
```{=html}
13+
<iframe src="qsupport-this-revealjs-slides.html" width="100%" height="600px" style="border:none;"></iframe>
14+
```
15+
16+
## Configuration
17+
18+
```markdown
19+
---
20+
title: "RevealJS Support-This"
21+
format: revealjs
22+
extensions:
23+
support-this:
24+
display: "icon-username"
25+
heading: "Support This Project"
26+
description: "Consider supporting our work!"
27+
position: bottom
28+
debug: true
29+
platforms:
30+
github: coatless
31+
patreon: coatless
32+
ko_fi: coatless
33+
filters: [support-this]
34+
---
35+
36+
## Slide
37+
38+
This is a RevealJS presentation testing the support-this extension.
39+
```

0 commit comments

Comments
 (0)