Shared CSS, JavaScript, SCSS theme, and Quarto/Reveal.js HTML fragments for Ontotext-style presentations.
Pinned CDN base (tag v1.0.0):
https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@v1.0.0
Sample background image: bkg-blue.jpg
| File | Purpose |
|---|---|
ontotext.scss |
Reveal.js theme (must be used locally at render time) |
quarto-revealjs-defaults.html |
Header fragment: CSS/JS with Subresource Integrity |
quarto-revealjs-title-slide.html |
Footer fragment: title-slide behaviour |
default.min.css, onto-hljs.css |
Code highlighting styles |
graphql.js, ttl.js, sparql.js, pie.js, trySparql.js |
Language highlighters |
bkg-blue.jpg |
Sample title-slide / background image |
Quarto has two different requirements:
- At render time —
theme:andinclude-in-header: file:must point to local files (Quarto cannot fetch remote files for these keys). - At view time — URLs inside the HTML fragments and in YAML metadata can point to this CDN.
my-talk/
Slides.qmd
ontotext.scss # copy from this repo
quarto-revealjs-defaults.html
quarto-revealjs-title-slide.html
from: gfm+autolink_bare_uris
format:
revealjs:
slide-number: c/t
# SCSS must stay local — Quarto compiles it at render time
theme: ontotext.scss
embed-resources: false
margin: 0
width: 1600
height: 900
code-copy: true
code-line-numbers: true
scrollable: true
auto-stretch: true
# Remote CDN URLs are fine in YAML metadata (images, logo)
background-image: https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@v1.0.0/bkg-blue.jpg
background-size: cover
background-opacity: 0.1
# Local HTML fragments — content inside them references the CDN
include-in-header:
- file: quarto-revealjs-defaults.html
include-after-body:
- file: quarto-revealjs-title-slide.html
title-slide-attributes:
data-background-image: https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@v1.0.0/bkg-blue.jpgYAML frontmatter at the top of a .qmd merges with _metadata.yml:
---
title: "My presentation"
author: "Your Name"
date: today
format:
revealjs:
width: 1920
height: 1080
title-slide-attributes:
data-background-image: https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@v1.0.0/bkg-blue.jpg
---quarto render Slides.qmd --to revealjs| Key | Local or remote | Role |
|---|---|---|
theme: |
Local | Compiles ontotext.scss into Reveal.js theme CSS |
include-in-header: file: |
Local file, remote URLs inside | Injects shared CSS/JS (with SRI) into <head> |
include-after-body: file: |
Local file | Runs title-slide JavaScript after Reveal.js loads |
background-image: |
Remote OK | Deck background (parallax) |
title-slide-attributes.data-background-image |
Remote OK | Title slide background |
logo: |
Remote OK | Slide logo image URL |
Prefer an immutable git tag or commit SHA instead of a moving branch:
https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@v1.0.0/onto-hljs.css
https://cdn.jsdelivr.net/gh/Ontotext-AD/shared-assets-presentations@<commit-sha>/onto-hljs.css
After upgrading assets, update:
- URLs in
quarto-revealjs-defaults.html - Subresource Integrity (
integrity="sha384-…") hashes - Any
background-image/logoURLs in your_metadata.yml
From this repository after changing a CSS/JS file:
python3 -c "
import base64, hashlib
from pathlib import Path
for name in ['default.min.css','onto-hljs.css','graphql.js','ttl.js','sparql.js','pie.js']:
d = hashlib.sha384((Path(name)).read_bytes()).digest()
print(name, 'sha384-' + base64.b64encode(d).decode())
"Apache License 2.0 — see LICENSE.