Skip to content

Commit 8cfa533

Browse files
committed
update workflow
1 parent cd0601e commit 8cfa533

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
1+
name: Deploy HyperionBox homepage from README
22

33
on:
44
push:
@@ -24,26 +24,33 @@ jobs:
2424
- name: Setup Pages
2525
uses: actions/configure-pages@v5
2626

27-
- name: Remove index.html and convert README.md to styled index.html
27+
- name: Install Pandoc
28+
run: sudo apt-get install -y pandoc
29+
30+
- name: Convert README.md to index.html with dark mode
2831
run: |
29-
rm -f index.html
30-
{
31-
echo "<!DOCTYPE html>"
32-
echo "<html lang='en'>"
33-
echo "<head>"
34-
echo " <meta charset='UTF-8'>"
35-
echo " <meta name='viewport' content='width=device-width, initial-scale=1.0'>"
36-
echo " <title>HyperionBox</title>"
37-
echo " <meta name='description' content='HyperionBox – open-source anime and movie streaming desktop app with extensions, watchlist, and offline support'>"
38-
echo " <link rel='stylesheet' href='style.css'>"
39-
echo "</head>"
40-
echo "<body>"
41-
echo " <article class='markdown-body'>"
42-
cat README.md
43-
echo " </article>"
44-
echo "</body>"
45-
echo "</html>"
46-
} > index.html
32+
pandoc README.md -o index.html --metadata title="HyperionBox" --standalone --css <(cat <<EOF
33+
body {
34+
margin: 0;
35+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
36+
background-color: #fff;
37+
color: #24292f;
38+
padding: 2em;
39+
}
40+
@media (prefers-color-scheme: dark) {
41+
body {
42+
background-color: #0d1117;
43+
color: #c9d1d9;
44+
}
45+
a { color: #58a6ff; }
46+
code { background-color: #161b22; color: #c9d1d9; }
47+
}
48+
img {
49+
max-width: 100%;
50+
height: auto;
51+
}
52+
EOF
53+
)
4754

4855
- name: Build with Jekyll
4956
uses: actions/jekyll-build-pages@v1

0 commit comments

Comments
 (0)