2
0
Fork 0
mirror of https://github.com/Vonng/ddia.git synced 2026-06-20 16:45:44 +08:00

feature: 增加生成 epub 格式的文件

This commit is contained in:
fantasyczl 2025-04-12 21:57:50 +08:00
parent b687c1e660
commit ab6fe0a1dd
2 changed files with 12 additions and 6 deletions

View file

@ -1,7 +1,5 @@
#!/usr/bin/env bash
set -ex
# Set the directory containing Markdown files
SCRIPT_DIR=$(dirname "$0")
INPUT_DIR=$(cd "$(dirname "$SCRIPT_DIR")" && pwd)
@ -19,7 +17,7 @@ convert_to_epub() {
local meta_file=${INPUT_DIR}/metadata.yaml
local css_file=${INPUT_DIR}/js/epub.css
pandoc -o "$OUTPUT_BOOK" "$meta_file" \
pandoc -o "$OUTPUT_BOOK" --metadata-file="$meta_file" \
--toc-depth=2 \
--top-level-division=chapter \
--file-scope=true \

View file

@ -1,5 +1,13 @@
---
title: 设计数据密集型应用
author: Martin Kleppmann
title:
- type: main
text: 设计数据密集型应用
- type: subtitle
text: 可靠、可扩展、可维护的系统
creator:
- role: author
name: Martin Kleppmann
rights: Creative Commons Non-Commercial Share Alike 3.0
language: 中文
cover-image: ./img/title.png