diff --git a/README.md b/README.md
index d49137d..604e697 100644
--- a/README.md
+++ b/README.md
@@ -99,6 +99,7 @@ Appleシリコン版Macや、Intel版Macの場で動作確認しています。
```ts
export default {
+ size: "JIS-B5", // B5判と"105mm 173mm"(新書)サイズのみ対応
title: "(本のタイトル)",
author: "(著者名)",
publisher: "(サークル名)",
@@ -120,6 +121,13 @@ brタグで改行ができます。`,
image: "../images/(プロファイル画像を置いて指定する).png",
},
],
+ cover: {
+ // TODO: 表紙画像が必要な場合は置いて指定してください
+ // front: "front-cover.png",
+ // back: "back-cover.png",
+ // start: "start-cover.png",
+ // end: "end-cover.png",
+ },
copyright: "(コピーライトを書く)",
};
```
diff --git a/docs/99-1_samples.md b/docs/99-1_samples.md
index b7e6fc2..a2a96c5 100644
--- a/docs/99-1_samples.md
+++ b/docs/99-1_samples.md
@@ -1,6 +1,6 @@
---
description:
- 利用できるのマークダウンの構文とカスタム構文のサンプル集です。
+ 利用できるマークダウンの構文とカスタム構文のサンプル集です。
追加のプラグインやHandlebar.jsで拡張した構文もふくめて、全ての構文を確認するためのサンプルになります。
color:
primary:
diff --git a/docs/_finally.md b/docs/_finally.md
index f290bd3..178d296 100644
--- a/docs/_finally.md
+++ b/docs/_finally.md
@@ -3,3 +3,5 @@ columns: true
---
# さいごに
+
+TODO: 作成する本の最後に記述する内容を記述します。作成する本に合わせて内容を変更してください。
diff --git a/docs/_introduction.md b/docs/_introduction.md
index 3394767..a7df83e 100644
--- a/docs/_introduction.md
+++ b/docs/_introduction.md
@@ -3,3 +3,27 @@ columns: true
---
# はじめに
+
+TODO: 作成する本のイントロダクションを記述します。作成する本に合わせて内容を変更してください。
+
+お手にとっていただきありがとうございます。
+
+
+サークル名 編 著/20yy-mm-dd 発行 v1.0.0
+
+
+## この本の内容について
+
+## お問い合わせ先
+
+X(旧Twitter): [@xxx](https://twitter.com/xxx){{footnote 'https://twitter.com/xxx'}}
+
+
+
+## 本書のフォントについて
+
+「Mgen+」を使用しています。
+
+Licensed under SIL Open Font License 1.1 (http://scripts.sil.org/OFL)
+© 2015 自家製フォント工房、© 2014, 2015 Adobe Systems Incorporated、© 2015 M+ FONTS PROJECT
+(http://jikasei.me/font/mgenplus/)
diff --git a/src/chapter-template.html b/src/chapter-template.html
index e930421..eb06d75 100644
--- a/src/chapter-template.html
+++ b/src/chapter-template.html
@@ -63,7 +63,7 @@
-
+
@@ -83,7 +83,7 @@
{{split data.matter.description 1 " " 2}}
-
+
{{{body}}}
diff --git a/src/cli.ts b/src/cli.ts
index 4b1b12d..98bfd2d 100644
--- a/src/cli.ts
+++ b/src/cli.ts
@@ -1,6 +1,9 @@
import { Command } from 'commander';
import concurrently from 'concurrently';
+import config from "../techbook.config";
+
const program = new Command();
+const cssSrcFileName = config.size === "JIS-B5" ? "global.css" : config.size === "105mm 173mm" ? "global-105x173.css" : "global.css";
program
.name('techbook-cli')
@@ -17,7 +20,7 @@ program.command('dev')
{ command: "npx --yes vite-node src/main.ts", name: "init" },
{ command: "npx --yes chokidar-cli \"src/**/*.ts\" \"src/**/*.html\" \"docs/**/*.md\" -c \"npx --yes vite-node src/main.ts\"", name: "main" },
{ command: `npx --yes listhen --host 0.0.0.0 --port ${h3Port} --watch ./src/viewer.ts`, name: "h3" },
- { command: "npx --yes wait-on --interval 500 ./dist/lockfile && npx --yes tailwindcss@latest -i ./src/global.css -o ./dist/global.css --watch --no-autoprefixer --postcss ./postcss.config.cjs", name: "tailwind" },
+ { command: `npx --yes wait-on --interval 500 ./dist/lockfile && npx --yes tailwindcss@latest -i ./src/${cssSrcFileName} -o ./dist/global.css --watch --no-autoprefixer --postcss ./postcss.config.cjs`, name: "tailwind" },
{ command: `npx --yes wait-on --interval 500 ./dist/global.css ./dist/lockfile && npx --yes browser-sync start --no-ui --port ${syncPort} --config 'bs-config.js' --files="dist/lockfile,dist/global.css,images/*" --reload-delay=4000 --reload-throttle=4000 --startPath="/index.html#src=/dist/publication.json&bookMode=true&renderAllPages=true&style=/dist/global.css" --browser "google chrome"`, name: "browser-sync" },
// { command: `npx --yes wait-on --interval 500 ./dist/global.css ./dist/lockfile && npx --yes browser-sync start --no-ui --port ${syncPort} --config 'bs-config.js' --files="dist/*" --reload-delay=4000 --reload-throttle=4000 --startPath="/index.html#src=/dist/publication.json&bookMode=true&renderAllPages=true&style=/dist/global.css" --browser "google chrome"`, name: "browser-sync" },
],
@@ -36,7 +39,7 @@ program.command('build')
const { result } = concurrently(
[
{ command: "npx --yes vite-node src/main.ts", name: "main" },
- { command: "npx --yes tailwindcss@latest -i ./src/global.css -o ./dist/global.css --no-autoprefixer --postcss ./postcss.config.cjs", name: "tailwind" },
+ { command: `npx --yes tailwindcss@latest -i ./src/${cssSrcFileName} -o ./dist/global.css --no-autoprefixer --postcss ./postcss.config.cjs`, name: "tailwind" },
{ command: "npx --yes @vivliostyle/cli build --style ./dist/global.css", name: "vivliostyle" },
],
{
diff --git a/src/constants.ts b/src/constants.ts
index 706c94c..9a3106f 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -41,6 +41,7 @@ export const lockFileSrcPath = "src/lockfile";
export const lockFileDistPath = "dist/lockfile";
export const chapterTemplateHtmlPath = "src/chapter-template.html";
+export const simpleChapterTemplateHtmlPath = "src/simplechapter-template.html";
export const appendixTitle = "Appendix";
export const appendixDistPath = "dist/appendix.dist.html";
@@ -59,6 +60,7 @@ export const finallyDocPath = "docs/_finally.md";
export const introductionDistPath = "dist/_introduction.dist.html";
export const finallyDistPath = "dist/_finally.dist.html";
export const introductionTemplateHtmlPath = "src/introduction-template.html";
+export const simpleIntroductionTemplateHtmlPath = "src/simpleintroduction-template.html";
export const tocDistPath = "dist/toc.dist.html";
@@ -67,12 +69,6 @@ export const frontCoverDistPath = "dist/front-cover.dist.html";
export const backCoverDistPath = "dist/back-cover.dist.html";
export const startCoverDistPath = "dist/start-cover.dist.html";
export const endCoverDistPath = "dist/end-cover.dist.html";
-export const coverDistPaths = [
- { path: frontCoverDistPath, image: "front-cover.png" },
- { path: backCoverDistPath, image: "back-cover.png" },
- { path: startCoverDistPath, image: "start-cover.png" },
- { path: endCoverDistPath, image: "end-cover.png" },
-];
// unifiedのプロセッサを作成する
export const processorRehype = unified()
diff --git a/src/cover-template.html b/src/cover-template.html
index bd77903..79a5691 100644
--- a/src/cover-template.html
+++ b/src/cover-template.html
@@ -9,6 +9,32 @@
+ {{#if coverImage}}
+ {{/if}}
+ {{#unless coverImage}}
+ {{#switch kind}}
+ {{#case "start"}}
+
+
+
+
+
+ {{/case}}
+ {{#case "front"}}
+
+
+
+ {{/case}}
+ {{#case "back"}}
+
+
+
+
+ {{/case}}
+ {{#default}}
+ {{/default}}
+ {{/switch}}
+ {{/unless}}