Skip to content

Commit

Permalink
feat: last updated
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Feb 21, 2024
1 parent 8a7b41d commit 4e049e8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sphinx==7.2.6
sphinx-contributors==0.2.7
sphinx-copybutton==0.5.2
# sphinx-design==0.5.0
sphinx-last-updated-by-git==0.3.6
sphinx-new-tab-link==0.2.2
sphinx-tabs==3.4.5
sphinx-togglebutton==0.3.2
9 changes: 9 additions & 0 deletions sources/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ section#base-de-connaissances-du-luma h1 {
font-size: 2em;
}

/* Article last updated. */
#last-updated {
text-align: right;
padding: .5em;
border-right: 2px solid var(--yue-c-link-border-1);
border-radius: 5px;
cursor: help;
}

/* Home page contributors. */
.sphinx-contributors img {
border-radius: 50%;
Expand Down
3 changes: 3 additions & 0 deletions sources/_templates/partials/article-bottom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div id="last-updated">
<abbr title="Dernère mise à jour">🕓 <code>{{ last_updated }}</code></abbr>
</div>
5 changes: 5 additions & 0 deletions sources/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
# "sphinx_design",
"sphinx_last_updated_by_git",
"sphinx_new_tab_link",
"sphinx_tabs.tabs",
"sphinx_togglebutton",
Expand Down Expand Up @@ -79,3 +80,7 @@
# Do not include drafts when deploying to production
if sys.argv[0].endswith("sphinx-build"):
exclude_patterns.append("brouillons/**")

# sphinx-last-updated-by-git
git_last_updated_timezone = UTC
html_last_updated_fmt = "%Y-%m-%d %H:%M:%S UTC"

0 comments on commit 4e049e8

Please sign in to comment.