Skip to content

Commit 3e5cfee

Browse files
committed
Add marp version of slides
- slides content now in markdown instead of google slides - add CI to generate slides as html and pdf
1 parent d9a3220 commit 3e5cfee

12 files changed

Lines changed: 1831 additions & 5 deletions

File tree

‎.github/workflows/pages.yml‎

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "20"
28+
29+
- name: Install marp-cli
30+
run: npm install --global @marp-team/marp-cli@^4
31+
32+
- uses: actions/configure-pages@v5
33+
34+
- name: Build Jekyll site
35+
uses: actions/jekyll-build-pages@v1
36+
with:
37+
source: ./docs
38+
destination: ./_site
39+
40+
- name: Build slides (HTML)
41+
run: marp docs/slides.md -o _site/slides.html
42+
43+
- name: Build slides (PDF)
44+
run: marp docs/slides.md --pdf -o _site/slides.pdf
45+
46+
- name: Render first PDF page as thumbnail
47+
run: pdftoppm -png -singlefile -f 1 -l 1 _site/slides.pdf _site/slides-thumb
48+
49+
- name: Upload Pages artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: ./_site
53+
54+
deploy:
55+
if: github.event_name != 'pull_request'
56+
needs: build
57+
runs-on: ubuntu-latest
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

‎.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,7 @@ dmypy.json
136136

137137
# Cython debug symbols
138138
cython_debug/
139+
140+
# Marp local outputs (slides are generated in CI to _site/)
141+
docs/*.html
142+
_site/

‎.marprc.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
themeSet:
2+
- docs/themes/ssc.css
3+
allowLocalFiles: true
4+
html: true

‎docs/_config.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
theme: jekyll-theme-slate
22
title: "Python Packaging"
33
description: "SSC Compact Course"
4-
exclude: [notebooks, tests]
4+
exclude:
5+
- notebooks
6+
- tests
7+
- slides.md

‎docs/assets/css/style.scss‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
max-width: 960px;
88
}
99

10-
iframe[src*="docs.google.com"]{
10+
/* Slide thumbnail link on the landing page */
11+
#main_content a > img[src$="slides-thumb.png"] {
12+
display: block;
1113
width: 100%;
1214
height: auto;
13-
aspect-ratio: 16 / 9;
15+
max-width: 960px;
16+
border: 1px solid rgba(58, 158, 191, 0.4);
17+
transition: border-color 0.15s ease;
18+
}
19+
20+
#main_content a:hover > img[src$="slides-thumb.png"] {
21+
border-color: #3a9ebf;
1422
}
1523

1624
#navigation ul {

‎docs/index.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ In this course we will learn how to package a Python library, how to publish it
44

55
## Slides
66

7-
<iframe src="https://docs.google.com/presentation/d/e/2PACX-1vT_Vn29jIR56s5mhC05Gasn3krbcw89fmG9TFEDn4Etmd5VhswnmdA0A8v5Z1aVqpvJtiUuvJSn7GDZ/embed?start=false&loop=false&delayms=3000" frameborder="0" width="960" height="569" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
7+
[![Open slides](slides-thumb.png)](slides.html)
88

9-
[download slides as pdf](https://github.com/ssciwr/python-packaging/raw/main/docs/slides/slides.pdf) | [course description](https://www.ssc.uni-heidelberg.de/en/compact-course-python-packaging)
9+
[open slides](slides.html) | [download as pdf](slides.pdf) | [course description](https://www.ssc.uni-heidelberg.de/en/compact-course-python-packaging)
1010

1111
## Python Package Examples
1212

0 commit comments

Comments
 (0)