Skip to content

Commit

Permalink
Switch to a Quarto Extension (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless authored Jul 24, 2024
1 parent d809963 commit 137230d
Show file tree
Hide file tree
Showing 82 changed files with 129 additions and 6,038 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Config options: https://github.com/rocker-org/devcontainer-templates/tree/main/src/r-ver
{
"name": "R (rocker/r-ver base)",
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4.4",
// Add software
"features": {
// Required to test with knitr
// R package config: https://github.com/rocker-org/devcontainer-features/blob/main/src/r-rig/README.md
"ghcr.io/rocker-org/devcontainer-features/r-rig:1": {
"version": "none",
"installRMarkdown": true,
"installJupyterlab": true,
"installRadian": true
},
// You may wish to switch prerelease to latest for stable development
// Quarto configuration : https://github.com/rocker-org/devcontainer-features/blob/main/src/quarto-cli/README.md
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
"installTinyTex": true,
"version": "latest"
}
},
"customizations": {
"vscode": {
"settings": {
"r.rterm.linux": "/usr/local/bin/radian",
"r.bracketedPaste": true,
"r.plot.useHttpgd": true,
"[r]": {
"editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?"
}
},
// Enable a development set of extensions for Lua and Quarto
"extensions": ["quarto.quarto", "sumneko.lua", "GitHub.copilot"]
}
}
}
44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: demo-website

jobs:
demo-website:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: quarto-website-${{ github.event_name != 'pull_request' || github.run_id }}
permissions:
contents: write
steps:
- name: "Check out repository"
uses: actions/checkout@v4

# To render using knitr, we need a few more setup steps...
# If we didn't want the examples to use `engine: knitr`, we could
# skip a few of the setup steps.
- name: "Setup R"
uses: r-lib/actions/setup-r@v2

- name: "Setup R dependencies for Quarto's knitr engine"
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::knitr
any::rmarkdown
any::downlit
any::xml2

# Back to our regularly scheduled Quarto output
- name: "Set up Quarto"
uses: quarto-dev/quarto-actions/setup@v2

- name: "Render and Publish"
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
.Rhistory
.RData
.Ruserdata
*.html
/.quarto/
*_files
*_site
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AAGI Revealjs Extension For Quarto

A [quarto extension](https://quarto.org/docs/extensions/) featuring an AAGI theme for the [reveal.js format](https://quarto.org/docs/presentations/revealjs/).

<a href="http://quarto.thecoatlessprofessor.com/AAGIRevealjs">
<img width="1648" alt="Screenshot of the template at the current moment" src="https://github.com/user-attachments/assets/9da837c2-1a97-4d27-922a-b7746a87f42e">
</a>

See the included [template.qmd](template.qmd) file for an example of the theme and integration into Quarto or explore the rendered version [here](http://quarto.thecoatlessprofessor.com/AAGIRevealjs/).

## Installing

You can obtain a copy of the extension by using:

```bash
quarto use template coatless-quarto/AAGIRevealjs
```

This will install the extension and create an example qmd file that
you can use as a starting place for your presentation slides.

10 changes: 10 additions & 0 deletions _extensions/aagi/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: aagi
author: Adam H. Sparks
version: 1.0.0
quarto-required: ">=1.4.0"
contributes:
formats:
revealjs:
css: aagi.css # consider using scss
logo: logo.svg

9 changes: 6 additions & 3 deletions assets/css/AAGI.css → _extensions/aagi/aagi.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@
.quarto-title-authors {
font-size: 28px;
}

.slides {
border-bottom: #00808b 20px solid;
background-image: url(../img/logo.svg), url(../img/footer.png);
background-size: 40%, 100%;
background-image: url(logo.svg), url(footer.png);
/* First portion control the logo placement,
second portion control the footer placement */
background-position: 100% 100%, bottom;
background-repeat: no-repeat;
background-position: 120% -230%, bottom;
background-size: contain;
}
File renamed without changes
File renamed without changes
2 changes: 2 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
project:
type: default
Loading

0 comments on commit 137230d

Please sign in to comment.