Skip to content

Commit 8f477f1

Browse files
committed
Add date of last update in the bottom of each page using a mkdocs plugin
1 parent cdbbe83 commit 8f477f1

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.github/workflows/build-website.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ jobs:
2020
python-version: '3.10'
2121

2222
- name: Install MkDocs
23-
run: pip install mkdocs mkdocs-material pymdown-extensions
23+
run: pip install mkdocs mkdocs-material pymdown-extensions mkdocs-git-revision-date-localized-plugin
2424

2525
- name: Silence hint on initial branch
2626
run: git config --global init.defaultBranch main
2727

2828
- name: Check out source repository
2929
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
3032

3133
- name: Build the web pages
3234
run: mkdocs build

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Follow these steps:
2727

2828
git clone https://github.com/openfedem/openfedem.org.git
2929

30-
2. Install MkDocs:
30+
2. Install MkDocs with extensions:
3131

32-
pip install mkdocs mkdocs-material pymdown-extensions
32+
pip install mkdocs mkdocs-material pymdown-extensions mkdocs-git-revision-date-localized-plugin
3333

3434
See the [MkDocs Installation Guide](https://www.mkdocs.org/#installation) for further instructions.
3535

@@ -53,9 +53,9 @@ After setting up the local environment:
5353

5454
## Conversions
5555

56-
The first line holds the title of the subpage and shall have Markdown heading level 1, typically `#<title>`
56+
The first line holds the title of the subpage and shall have Markdown heading level 1, typically `# <title>`.
5757

58-
The Markdown heading level 2, e.g., `##<section heading>`, represents the first section level, and so on.
58+
The Markdown heading level 2, e.g., `## <section heading>`, represents the first section level, and so on.
5959

6060
## Contributing
6161

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,8 @@ markdown_extensions:
7676

7777
extra_css:
7878
- css/custom.css
79+
80+
plugins:
81+
- search
82+
- git-revision-date-localized: # Requires: pip install mkdocs-git-revision-date-localized-plugin
83+
enable_creation_date: true

0 commit comments

Comments
 (0)