From c5e3a781e929bb9a186a78153e47e9364b1f8f1f Mon Sep 17 00:00:00 2001 From: loikein Date: Tue, 25 Apr 2023 15:19:20 +0100 Subject: [PATCH] add example book in example site --- exampleSite/config.yaml | 8 ++++++-- exampleSite/content/exampleBook/_index.md | 17 +++++++++++++++++ exampleSite/content/exampleBook/vol-1/_index.md | 13 +++++++++++++ .../content/exampleBook/vol-1/vol-1-ch-1.md | 3 +++ .../content/exampleBook/vol-1/vol-1-ch-2.md | 3 +++ exampleSite/content/exampleBook/vol-2/_index.md | 14 ++++++++++++++ .../content/exampleBook/vol-2/vol-2-ch-1.md | 3 +++ .../content/exampleBook/vol-2/vol-2-ch-2.md | 3 +++ .../content/exampleBook/vol-2/vol-2-ch-3.md | 4 ++++ 9 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 exampleSite/content/exampleBook/_index.md create mode 100644 exampleSite/content/exampleBook/vol-1/_index.md create mode 100644 exampleSite/content/exampleBook/vol-1/vol-1-ch-1.md create mode 100644 exampleSite/content/exampleBook/vol-1/vol-1-ch-2.md create mode 100644 exampleSite/content/exampleBook/vol-2/_index.md create mode 100644 exampleSite/content/exampleBook/vol-2/vol-2-ch-1.md create mode 100644 exampleSite/content/exampleBook/vol-2/vol-2-ch-2.md create mode 100644 exampleSite/content/exampleBook/vol-2/vol-2-ch-3.md diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 0ed9add..e81ec3e 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -10,10 +10,10 @@ hasCJKLanguage: true # The url of your website baseurl: "https://example.com/" # The title of your website (shown on all the pages) -title: "Hugo-tufte Theme Example Site" +title: "Hugo-Tufte Theme Example Site" canonifyurls: true # Number of posts per page on the home page -paginate: 4 +paginate: 5 # Only modify the following if you know what you are doing markup: @@ -79,6 +79,10 @@ menu: weight: -100 identifier: posts url: /posts/ + - name: A-Book + weight: -95 + identifier: book + url: /exampleBook/ - name: Categories weight: -90 identifier: categories diff --git a/exampleSite/content/exampleBook/_index.md b/exampleSite/content/exampleBook/_index.md new file mode 100644 index 0000000..4705d2f --- /dev/null +++ b/exampleSite/content/exampleBook/_index.md @@ -0,0 +1,17 @@ +--- +title: Probably A Book +subtitle: Best book ever! +type: book +layout: all +draft: true +--- +This is a layout showcase for: + +```yaml +type: book +layout: all +``` + +Change `all` to `volumes` to hide chapters. + +Below lists all volumes and chapters in this book alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/exampleSite/content/exampleBook/vol-1/_index.md b/exampleSite/content/exampleBook/vol-1/_index.md new file mode 100644 index 0000000..f138787 --- /dev/null +++ b/exampleSite/content/exampleBook/vol-1/_index.md @@ -0,0 +1,13 @@ +--- +title: Volume 1. Good Volume +type: book +layout: chapters +--- +This is a layout showcase for: + +```yaml +type: book +layout: chapters +``` + +Below lists all chapters in this volume alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/exampleSite/content/exampleBook/vol-1/vol-1-ch-1.md b/exampleSite/content/exampleBook/vol-1/vol-1-ch-1.md new file mode 100644 index 0000000..bf860b7 --- /dev/null +++ b/exampleSite/content/exampleBook/vol-1/vol-1-ch-1.md @@ -0,0 +1,3 @@ +--- +title: Chapter 1. Good Chapter +--- diff --git a/exampleSite/content/exampleBook/vol-1/vol-1-ch-2.md b/exampleSite/content/exampleBook/vol-1/vol-1-ch-2.md new file mode 100644 index 0000000..e52cc6e --- /dev/null +++ b/exampleSite/content/exampleBook/vol-1/vol-1-ch-2.md @@ -0,0 +1,3 @@ +--- +title: Chapter 2. Better Chapter +--- diff --git a/exampleSite/content/exampleBook/vol-2/_index.md b/exampleSite/content/exampleBook/vol-2/_index.md new file mode 100644 index 0000000..8b6c40b --- /dev/null +++ b/exampleSite/content/exampleBook/vol-2/_index.md @@ -0,0 +1,14 @@ +--- +title: Volume 2. Cool Volume +type: book +layout: chapters +draft: true +--- +This is a layout showcase for: + +```yaml +type: book +layout: chapters +``` + +Below lists all chapters in this volume alphabetically. If you see repetitions, just restart the hugo server and it should be fixed. diff --git a/exampleSite/content/exampleBook/vol-2/vol-2-ch-1.md b/exampleSite/content/exampleBook/vol-2/vol-2-ch-1.md new file mode 100644 index 0000000..25c6a0e --- /dev/null +++ b/exampleSite/content/exampleBook/vol-2/vol-2-ch-1.md @@ -0,0 +1,3 @@ +--- +title: Chapter 3. Cool Chapter +--- diff --git a/exampleSite/content/exampleBook/vol-2/vol-2-ch-2.md b/exampleSite/content/exampleBook/vol-2/vol-2-ch-2.md new file mode 100644 index 0000000..28eeab4 --- /dev/null +++ b/exampleSite/content/exampleBook/vol-2/vol-2-ch-2.md @@ -0,0 +1,3 @@ +--- +title: Chapter 4. Cooler Chapter +--- diff --git a/exampleSite/content/exampleBook/vol-2/vol-2-ch-3.md b/exampleSite/content/exampleBook/vol-2/vol-2-ch-3.md new file mode 100644 index 0000000..b089e60 --- /dev/null +++ b/exampleSite/content/exampleBook/vol-2/vol-2-ch-3.md @@ -0,0 +1,4 @@ +--- +title: Chapter 5. Coolest Chapter +draft: true +---