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