Skip to content

Commit

Permalink
switch to quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Apr 11, 2024
1 parent 1a58ee8 commit 62d28f6
Show file tree
Hide file tree
Showing 58 changed files with 529 additions and 4,702 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/quarto-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
workflow_dispatch:
push:
branches: [main, master]

name: Quarto Render and Publish

jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2

- name: Set up R
uses: r-lib/actions/setup-r@v2

- name: Install R packages
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
any::knitr
any::rmarkdown

- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
with:
target: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
# intro-git
# Version control with git & GitHub <img src="https://raw.githubusercontent.com/FRBCesab/templates/main/logos/website-sticker.png" align="right" style="float:right; height:120px;"/>

[![pages-build-deployment](https://github.com/FRBCesab/intro-git/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/FRBCesab/intro-git/actions/workflows/pages/pages-build-deployment)
<!-- badges: start -->
[![Quarto Render and Publish](https://github.com/FRBCesab/intro-git/actions/workflows/quarto-publish.yml/badge.svg)](https://github.com/FRBCesab/intro-git/actions/workflows/quarto-publish.yml)
[![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-green.svg)](https://choosealicense.com/licenses/cc-by-4.0/)<!-- badges: end -->

A [`xaringan`](https://cran.r-project.org/web/packages/xaringan/index.html) presentation to introduce [`git`](https://git-scm.com/) and [`GitHub`](https://github.com).



## Setup

You'll need these two R packages: `rmarkdown` and `xaringan`.

```{r}
install.packages(c("rmarkdown", "xaringan"))
```


## Contributing

To modify the slides, edit the `index.Rmd` and then:

```{r}
rmarkdown::render("index.Rmd")
```
Coming soon...
7 changes: 7 additions & 0 deletions _extensions/quarto-ext/fontawesome/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: Font Awesome support
author: Carlos Scheidegger
version: 1.1.0
quarto-required: ">=1.2.269"
contributes:
shortcodes:
- fontawesome.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Font Awesome Free 6.2.1 by @fontawesome - https://fontawesome.com
* Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2022 Fonticons, Inc.
* Copyright 2023 Fonticons, Inc.
*/
.fa {
font-family: var(--fa-style-family, "Font Awesome 6 Free");
Expand All @@ -15,7 +15,13 @@
.far,
.fa-regular,
.fab,
.fa-brands {
.fa-brands,
.fal,
.fa-light,
.fat,
.fa-thin,
.fad,
.fa-duotone {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: var(--fa-display, inline-block);
Expand Down Expand Up @@ -258,8 +264,10 @@
animation-duration: 1ms;
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
transition-delay: 0s;
transition-duration: 0s; } }
-webkit-transition-delay: 0s;
transition-delay: 0s;
-webkit-transition-duration: 0s;
transition-duration: 0s; } }

@-webkit-keyframes fa-beat {
0%, 90% {
Expand Down Expand Up @@ -491,6 +499,7 @@

/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */

.fa-0::before {
content: "\30"; }

Expand Down Expand Up @@ -6376,7 +6385,7 @@ readers do not read off random characters that represent icons */
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Brands-Regular-400.woff2") format("woff2"), url("../webfonts/FontAwesome6Brands-Regular-400.ttf") format("truetype"); }

.fab,
.fa-brands {
Expand Down Expand Up @@ -6547,6 +6556,9 @@ readers do not read off random characters that represent icons */
.fa-edge:before {
content: "\f282"; }

.fa-threads:before {
content: "\e618"; }

.fa-napster:before {
content: "\f3d2"; }

Expand Down Expand Up @@ -6715,6 +6727,9 @@ readers do not read off random characters that represent icons */
.fa-scribd:before {
content: "\f28a"; }

.fa-debian:before {
content: "\e60b"; }

.fa-openid:before {
content: "\f19b"; }

Expand Down Expand Up @@ -6955,6 +6970,9 @@ readers do not read off random characters that represent icons */
.fa-neos:before {
content: "\f612"; }

.fa-square-threads:before {
content: "\e619"; }

.fa-hackerrank:before {
content: "\f5f7"; }

Expand Down Expand Up @@ -7297,6 +7315,9 @@ readers do not read off random characters that represent icons */
.fa-erlang:before {
content: "\f39d"; }

.fa-x-twitter:before {
content: "\e61b"; }

.fa-cotton-bureau:before {
content: "\f89e"; }

Expand Down Expand Up @@ -7744,6 +7765,9 @@ readers do not read off random characters that represent icons */
.fa-internet-explorer:before {
content: "\f26b"; }

.fa-stubber:before {
content: "\e5c7"; }

.fa-telegram:before {
content: "\f2c6"; }

Expand All @@ -7753,6 +7777,9 @@ readers do not read off random characters that represent icons */
.fa-old-republic:before {
content: "\f510"; }

.fa-odysee:before {
content: "\e5c6"; }

.fa-square-whatsapp:before {
content: "\f40c"; }

Expand Down Expand Up @@ -7786,6 +7813,9 @@ readers do not read off random characters that represent icons */
.fa-quora:before {
content: "\f2c4"; }

.fa-square-x-twitter:before {
content: "\e61a"; }

.fa-reacteurope:before {
content: "\f75d"; }

Expand Down Expand Up @@ -7887,7 +7917,7 @@ readers do not read off random characters that represent icons */
font-style: normal;
font-weight: 400;
font-display: block;
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Free-Regular-400.woff2") format("woff2"), url("../webfonts/FontAwesome6Free-Regular-400.ttf") format("truetype"); }

.far,
.fa-regular {
Expand All @@ -7901,44 +7931,41 @@ readers do not read off random characters that represent icons */
font-style: normal;
font-weight: 900;
font-display: block;
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Free-Solid-900.woff2") format("woff2"), url("../webfonts/FontAwesome6Free-Solid-900.ttf") format("truetype"); }

.fas,
.fa-solid {
font-weight: 900; }
@font-face {
font-family: 'Font Awesome 5 Brands';
font-family: 'Font Awesome 6 Brands';
font-display: block;
font-weight: 400;
src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Brands-Regular-400.woff2") format("woff2"), url("../webfonts/FontAwesome6Brands-Regular-400.ttf") format("truetype"); }

@font-face {
font-family: 'Font Awesome 5 Free';
font-family: 'Font Awesome 6 Free';
font-display: block;
font-weight: 900;
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Free-Solid-900.woff2") format("woff2"), url("../webfonts/FontAwesome6Free-Solid-900.ttf") format("truetype"); }

@font-face {
font-family: 'Font Awesome 5 Free';
font-family: 'Font Awesome 6 Free';
font-display: block;
font-weight: 400;
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
src: url("../webfonts/../webfonts/FontAwesome6Free-Regular-400.woff2") format("woff2"), url("../webfonts/FontAwesome6Free-Regular-400.ttf") format("truetype"); }
@font-face {
font-family: 'FontAwesome';
font-family: 'Font Awesome 6 Free';
font-display: block;
src: url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Free-Solid-900.woff2") format("woff2"), url("../webfonts/FontAwesome6Free-Solid-900.ttf") format("truetype"); }

@font-face {
font-family: 'FontAwesome';
font-family: 'Font Awesome 6 Brands';
font-display: block;
src: url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Brands-Regular-400.woff2") format("woff2"), url("../webfonts/FontAwesome6Brands-Regular-400.ttf") format("truetype"); }

@font-face {
font-family: 'FontAwesome';
font-family: 'Font Awesome 6 Free';
font-display: block;
src: url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.ttf") format("truetype"); }
src: url("../webfonts/FontAwesome6Free-Regular-400.woff2") format("woff2"), url("../../webfonts/FontAwesome6Free-Regular-400.ttf") format("truetype");
unicode-range: U+F003,U+F006,U+F014,U+F016-F017,U+F01A-F01B,U+F01D,U+F022,U+F03E,U+F044,U+F046,U+F05C-F05D,U+F06E,U+F070,U+F087-F088,U+F08A,U+F094,U+F096-F097,U+F09D,U+F0A0,U+F0A2,U+F0A4-F0A7,U+F0C5,U+F0C7,U+F0E5-F0E6,U+F0EB,U+F0F6-F0F8,U+F10C,U+F114-F115,U+F118-F11A,U+F11C-F11D,U+F133,U+F147,U+F14E,U+F150-F152,U+F185-F186,U+F18E,U+F190-F192,U+F196,U+F1C1-F1C9,U+F1D9,U+F1DB,U+F1E3,U+F1EA,U+F1F7,U+F1F9,U+F20A,U+F247-F248,U+F24A,U+F24D,U+F255-F25B,U+F25D,U+F271-F274,U+F278,U+F27B,U+F28C,U+F28E,U+F29C,U+F2B5,U+F2B7,U+F2BA,U+F2BC,U+F2BE,U+F2C0-F2C1,U+F2C3,U+F2D0,U+F2D2,U+F2D4,U+F2DC; }

@font-face {
font-family: 'FontAwesome';
font-display: block;
src: url("../webfonts/fa-v4compatibility.woff2") format("woff2"), url("../webfonts/fa-v4compatibility.ttf") format("truetype"); }
30 changes: 30 additions & 0 deletions _extensions/quarto-ext/fontawesome/assets/css/latex-fontsize.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.fa-tiny {
font-size: 0.5em;
}
.fa-scriptsize {
font-size: 0.7em;
}
.fa-footnotesize {
font-size: 0.8em;
}
.fa-small {
font-size: 0.9em;
}
.fa-normalsize {
font-size: 1em;
}
.fa-large {
font-size: 1.2em;
}
.fa-Large {
font-size: 1.5em;
}
.fa-LARGE {
font-size: 1.75em;
}
.fa-huge {
font-size: 2em;
}
.fa-Huge {
font-size: 2.5em;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
84 changes: 84 additions & 0 deletions _extensions/quarto-ext/fontawesome/fontawesome.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
local function ensureLatexDeps()
quarto.doc.use_latex_package("fontawesome5")
end

local function ensureHtmlDeps()
quarto.doc.add_html_dependency({
name = 'fontawesome6',
version = '0.1.0',
stylesheets = {'assets/css/all.css', 'assets/css/latex-fontsize.css'}
})
end

local function isEmpty(s)
return s == nil or s == ''
end

local function isValidSize(size)
local validSizes = {
"tiny",
"scriptsize",
"footnotesize",
"small",
"normalsize",
"large",
"Large",
"LARGE",
"huge",
"Huge"
}
for _, v in ipairs(validSizes) do
if v == size then
return size
end
end
return ""
end

return {
["fa"] = function(args, kwargs)

local group = "solid"
local icon = pandoc.utils.stringify(args[1])
if #args > 1 then
group = icon
icon = pandoc.utils.stringify(args[2])
end

local title = pandoc.utils.stringify(kwargs["title"])
if not isEmpty(title) then
title = " title=\"" .. title .. "\""
end

local label = pandoc.utils.stringify(kwargs["label"])
if isEmpty(label) then
label = " aria-label=\"" .. icon .. "\""
else
label = " aria-label=\"" .. label .. "\""
end

local size = pandoc.utils.stringify(kwargs["size"])

-- detect html (excluding epub which won't handle fa)
if quarto.doc.is_format("html:js") then
ensureHtmlDeps()
if not isEmpty(size) then
size = " fa-" .. size
end
return pandoc.RawInline(
'html',
"<i class=\"fa-" .. group .. " fa-" .. icon .. size .. "\"" .. title .. label .. "></i>"
)
-- detect pdf / beamer / latex / etc
elseif quarto.doc.is_format("pdf") then
ensureLatexDeps()
if isEmpty(isValidSize(size)) then
return pandoc.RawInline('tex', "\\faIcon{" .. icon .. "}")
else
return pandoc.RawInline('tex', "{\\" .. size .. "\\faIcon{" .. icon .. "}}")
end
else
return pandoc.Null()
end
end
}
Loading

0 comments on commit 62d28f6

Please sign in to comment.