Skip to content

Commit ec635e4

Browse files
committed
Fix GitHub Pages 404 by moving reveal.js to lib directory
- Copy reveal.js files from node_modules to lib/ for GitHub Pages compatibility - Update presentation and template HTML files to use /lib/reveal.js/ paths instead of /node_modules/reveal.js/ - Update Jekyll config to include lib directory and exclude node_modules - Add build task to automatically set up lib directory - Update GitHub Actions deploy workflow to run build step - This fixes 404 errors when accessing presentations on GitHub Pages
1 parent 9adc0ee commit ec635e4

File tree

30 files changed

+3152
-20
lines changed

30 files changed

+3152
-20
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
- name: Install dependencies
3535
run: npm ci
3636

37+
- name: Build site
38+
run: npm run build
39+
3740
- name: Setup Pages
3841
uses: actions/configure-pages@v4
3942

Taskfile.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tasks:
99
desc: Install dependencies
1010
cmds:
1111
- npm install
12+
- task setup-lib
1213

1314
serve:
1415
desc: Start local development server
@@ -64,10 +65,19 @@ tasks:
6465
cmds:
6566
- ./scripts/update-index.sh
6667

68+
setup-lib:
69+
desc: Set up library files for GitHub Pages deployment
70+
cmds:
71+
- mkdir -p lib/reveal.js
72+
- cp -r node_modules/reveal.js/dist lib/reveal.js/
73+
- cp -r node_modules/reveal.js/plugin lib/reveal.js/
74+
- echo "✅ Library files copied to lib/ directory"
75+
6776
clean:
6877
desc: Clean generated files
6978
cmds:
7079
- npm run clean
80+
- rm -rf lib
7181

7282
help:
7383
desc: Show available commands

_config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Jekyll configuration for GitHub Pages
22
# This file tells GitHub Pages to serve the site directly without Jekyll processing
33

4-
# Prevent Jekyll from processing files
4+
# Include necessary directories
55
include:
6-
- node_modules
6+
- lib
77

88
# Exclude unnecessary files from the published site
99
exclude:
@@ -13,5 +13,6 @@ exclude:
1313
- Taskfile.yml
1414
- package.json
1515
- package-lock.json
16+
- node_modules
1617
- README.md
1718
- CONTRIBUTING.md

lib/reveal.js/plugin/highlight/highlight.esm.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/reveal.js/plugin/highlight/highlight.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
Monokai style - ported by Luigi Maselli - http://grigio.org
3+
*/
4+
5+
.hljs {
6+
display: block;
7+
overflow-x: auto;
8+
padding: 0.5em;
9+
background: #272822;
10+
color: #ddd;
11+
}
12+
13+
.hljs-tag,
14+
.hljs-keyword,
15+
.hljs-selector-tag,
16+
.hljs-literal,
17+
.hljs-strong,
18+
.hljs-name {
19+
color: #f92672;
20+
}
21+
22+
.hljs-code {
23+
color: #66d9ef;
24+
}
25+
26+
.hljs-class .hljs-title {
27+
color: white;
28+
}
29+
30+
.hljs-attribute,
31+
.hljs-symbol,
32+
.hljs-regexp,
33+
.hljs-link {
34+
color: #bf79db;
35+
}
36+
37+
.hljs-string,
38+
.hljs-bullet,
39+
.hljs-subst,
40+
.hljs-title,
41+
.hljs-section,
42+
.hljs-emphasis,
43+
.hljs-type,
44+
.hljs-built_in,
45+
.hljs-builtin-name,
46+
.hljs-selector-attr,
47+
.hljs-selector-pseudo,
48+
.hljs-addition,
49+
.hljs-variable,
50+
.hljs-template-tag,
51+
.hljs-template-variable {
52+
color: #a6e22e;
53+
}
54+
55+
.hljs-comment,
56+
.hljs-quote,
57+
.hljs-deletion,
58+
.hljs-meta {
59+
color: #75715e;
60+
}
61+
62+
.hljs-keyword,
63+
.hljs-selector-tag,
64+
.hljs-literal,
65+
.hljs-doctag,
66+
.hljs-title,
67+
.hljs-section,
68+
.hljs-type,
69+
.hljs-selector-id {
70+
font-weight: bold;
71+
}

0 commit comments

Comments
 (0)