From ab6fe0a1ddcabf511ec66125a2c3327f3bdb2afe Mon Sep 17 00:00:00 2001 From: fantasyczl Date: Sat, 12 Apr 2025 21:57:50 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E5=A2=9E=E5=8A=A0=E7=94=9F=E6=88=90?= =?UTF-8?q?=20epub=20=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/epub | 4 +--- metadata.yaml | 14 +++++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/epub b/bin/epub index 94469ba..5412a4a 100755 --- a/bin/epub +++ b/bin/epub @@ -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 \ diff --git a/metadata.yaml b/metadata.yaml index e1a75c7..050dfb6 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -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