feat: use mdbook-last-changed to indicate when a file has been last updated

pull/399/head^2
simonsan 1 month ago
parent 6f8e91a5e7
commit 9a69ea655d
No known key found for this signature in database
GPG Key ID: E11D13668EC3B71B

@ -1,3 +1,4 @@
MDBOOK_VERSION=0.4.37
MDBOOK_I18N_HELPERS_VERSION=0.3.2
MDBOOK_PANDOC_VERSION=0.6.0
MDBOOK_LAST_CHANGED_VERSION=0.1.4

@ -26,10 +26,17 @@ runs:
echo "version=$MDBOOK_PANDOC_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Read mdbook-last-changed version from .env
id: mdbook-last-changed-version
run: |
. ./.env
echo "version=$MDBOOK_LAST_CHANGED_VERSION" >> $GITHUB_OUTPUT
shell: bash
- name: Install dependencies
uses: taiki-e/install-action@v2
with:
tool: mdbook@${{ steps.mdbook-version.outputs.version }},mdbook-pandoc@${{ steps.mdbook-pandoc-version.outputs.version }},mdbook-i18n-helpers@${{ steps.mdbook-i18n-helpers-version.outputs.version }}
tool: mdbook@${{ steps.mdbook-version.outputs.version }},mdbook-pandoc@${{ steps.mdbook-pandoc-version.outputs.version }},mdbook-i18n-helpers@${{ steps.mdbook-i18n-helpers-version.outputs.version }},mdbook-last-changed@${{ steps.mdbook-last-changed-version.outputs.version }}
- name: Install mdbook-pandoc and related dependencies
run: |

@ -23,7 +23,14 @@ site-url = "/patterns/"
git-repository-url = "https://github.com/rust-unofficial/patterns"
git-repository-icon = "fa-github"
edit-url-template = "https://github.com/rust-unofficial/patterns/edit/main/{path}"
additional-css = ["theme/css/language-picker.css"]
additional-css = [
"./theme/css/language-picker.css",
"./styles/last-changed.css",
]
[preprocessor.last-changed]
command = "mdbook-last-changed"
renderer = ["html"]
[output.html.fold]
enable = true

@ -0,0 +1,7 @@
footer {
font-size: 0.8em;
text-align: center;
border-top: 1px solid grey;
padding: 1.25em 0;
margin-top: 1.25em;
}
Loading…
Cancel
Save