From 82c0e4b2605397f8b2a88e7fefe955eec3072728 Mon Sep 17 00:00:00 2001 From: Andreas Pfeil Date: Thu, 16 Nov 2023 19:39:34 +0100 Subject: [PATCH] Update mdbook and logo-inclusion to v0.4.35 --- .github/workflows/mdbook.yml | 4 +- README.md | 41 +++++++++++ theme/index.hbs | 135 ++++++++++++++++++++++------------- 3 files changed, 128 insertions(+), 52 deletions(-) diff --git a/.github/workflows/mdbook.yml b/.github/workflows/mdbook.yml index 77162d7..ae45ef0 100644 --- a/.github/workflows/mdbook.yml +++ b/.github/workflows/mdbook.yml @@ -7,14 +7,14 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v2 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: '0.4.6' + mdbook-version: '0.4.35' # mdbook-version: 'latest' - run: mdbook build diff --git a/README.md b/README.md index b3ae775..050dc92 100644 --- a/README.md +++ b/README.md @@ -46,3 +46,44 @@ By default the images are left-aligned with the maximum width being the same as cookbook cover ``` + +## Applied Theme customizations + +Please try to make the customizations somehow findable, e.g. by leaving a comment with the keyword "KIT customization" or so, so one can search for "KIT" and find it. + +### Header + +To make the logo in the header work: + +- `index.hbs`: default is https://github.com/rust-lang/mdBook/blob/master/src/theme/index.hbs + - The index file in this repository is a copy with the following modifications. + - Switched those lines ([see issue](https://github.com/rust-lang/mdBook/issues/1331#issuecomment-903108413)): + ```html + + {{> header}} + ``` + This makes the trick with the `header.hbs` file work. + - Added the logos for desktop view to the "right-buttons" div: + ```html +
+ + - Added a script to define on which theme which logo is being shown: + ```html + + {{/if}} - + +
- - - + + - + + +
+ + + {{> header}} -