Thanks - it wasn't clear that the theme might not respect this setting, so this
clears things up. Looks like some template has to actually do something with
the "last_updated" value.
The theme I actually want to use is the pydata theme, which fortunately can be
easily configured to give me my desired behavior.
For others who might stumble on this thread, these are the important things I
added to conf.py :
html_theme = 'pydata_sphinx_theme'
html_theme_options = {
"footer_items": ["copyright", "sphinx-version", "last-updated"],
}
html_last_updated_fmt='%Y-%m-%d'
Doc:
https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/sections.html
> Am 23.04.2021 um 10:52 schrieb Matthias Geier <[email protected]>:
>
> On Fri, Apr 23, 2021 at 10:12 AM sphinxuser124323 wrote:
>>
>> I'd like to to use the "html_last_updated_fmt" option, but I'm having some
>> trouble.
>
> If and where the date is displayed depends on the selected HTML theme.
>
> The default "alabaster" theme seems to not display the date at all.
>
> To fix this, you can create a custom template as shown in this issue:
> https://github.com/bitprophet/alabaster/issues/93
> <https://github.com/bitprophet/alabaster/issues/93>
>
> Alternatively, you can choose a different HTML theme that displays the
> date by default.
>
> For a list of some themes, check out https://sphinx-themes.org/
> <https://sphinx-themes.org/>.
>
> And if you want to show the "last updated" date for each HTML page
> individually (instead of the same date for all pages), you can try my
> little Sphinx extension
> https://github.com/mgeier/sphinx-last-updated-by-git
> <https://github.com/mgeier/sphinx-last-updated-by-git>.
>
> cheers,
> Matthias
>
>> To test, I
>>
>> - start a new project with sphinx-quickstart
>> - add this at the bottom of conf.py
>>
>> html_last_updated_fmt='%Y-%m-%d'"
>>
>> - run "make html"
>> - open _build/html/index.html
>>
>> I was expected to see a date generated somewhere in the footer, but I don't.
>> Is it clear what I'm doing wrong?
>>
>> I am using Sphinx 3.5.4
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "sphinx-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/sphinx-users/7b28805d-e27e-40cf-80c3-1c8ba7039989n%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sphinx-users/CAFesC-eo4ga2H95iscg4XQpj662KbB21GbjGqJ-jSCUOyk%2BujQ%40mail.gmail.com
>
> <https://groups.google.com/d/msgid/sphinx-users/CAFesC-eo4ga2H95iscg4XQpj662KbB21GbjGqJ-jSCUOyk%2BujQ%40mail.gmail.com>.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sphinx-users/F08239AC-6733-4AEA-AAE1-00ACFCFFC2A4%40gmail.com.