mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-21 08:27:49 +00:00
Compare commits
7 Commits
7b5120d2d3
...
7b6331cf18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b6331cf18 | ||
|
|
2b6fc68ad1 | ||
|
|
e2f2f4c533 | ||
|
|
6a27ab2c2d | ||
|
|
5c3adee95b | ||
|
|
fc8c87bee5 | ||
|
|
e1c58bba97 |
5
.github/workflows/blog.yml
vendored
5
.github/workflows/blog.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
working-directory: "blog"
|
working-directory: "blog"
|
||||||
|
|
||||||
- name: Upload Generated Site
|
- name: Upload Generated Site
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: generated_site
|
name: generated_site
|
||||||
path: blog/public
|
path: blog/public
|
||||||
@@ -58,9 +58,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Download Generated Site"
|
- name: "Download Generated Site"
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: generated_site
|
name: generated_site
|
||||||
|
path: generated_site
|
||||||
|
|
||||||
- name: Setup SSH Keys and known_hosts
|
- name: Setup SSH Keys and known_hosts
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ Philipp Oppermann
|
|||||||
|
|
||||||
<big>contact@phil-opp.com</big>
|
<big>contact@phil-opp.com</big>
|
||||||
|
|
||||||
<small>Gerwigstraße 17, 76131 Karlsruhe, Germany</small>
|
<small>Erna-Hötzel-Str. 3, 76344 Eggenstein, Germany</small>
|
||||||
|
|||||||
BIN
scripts/cover.png
Normal file
BIN
scripts/cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
30
scripts/create-book.sh
Executable file
30
scripts/create-book.sh
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# create working dir
|
||||||
|
rm -r book/
|
||||||
|
mkdir book/
|
||||||
|
|
||||||
|
# copy data to working dir
|
||||||
|
cat ../blog/content/edition-2/posts/*/index.md > book/book.md
|
||||||
|
find ../blog/content/edition-2/posts ! -name "*.md" -exec cp -t book/ {} +
|
||||||
|
|
||||||
|
# remove zola metadata
|
||||||
|
sed -i '/^+++/,/^+++/d' book/book.md
|
||||||
|
# remove br in table in 06, pandoc handles the layout
|
||||||
|
sed -i '/<br>/d' book/book.md
|
||||||
|
# details/summary breaks epub layout
|
||||||
|
sed -i '/^<details>/d' book/book.md
|
||||||
|
sed -i '/^<\/details>/d' book/book.md
|
||||||
|
sed -i '/^<summary>/d' book/book.md
|
||||||
|
|
||||||
|
# special fix for linking to different folder
|
||||||
|
sed -i 's|../paging-introduction/||g' book/book.md
|
||||||
|
|
||||||
|
# go to work dir and create epub
|
||||||
|
cd book/
|
||||||
|
pandoc book.md -o "Writing an OS in Rust.epub" --metadata cover-image="../cover.png" --metadata title="Writing an OS in Rust" --metadata author="Philipp Oppermann" --metadata description="This blog series creates a small operating system in the Rust programming language. Each post is a small tutorial and includes all needed code, so you can follow along if you like. The source code is also available in the corresponding Github repository."
|
||||||
|
|
||||||
|
#clean up
|
||||||
|
cd ..
|
||||||
|
mv "book/Writing an OS in Rust.epub" .
|
||||||
|
rm -rf book/
|
||||||
Reference in New Issue
Block a user