Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Only show 'Last updated on ...' whenlast_updated defined#183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 2 commits intopython:mainfromhugovk:fix-last-updated-on-none
Mar 25, 2024

Conversation

hugovk
Copy link
Member

@hugovkhugovk commentedMar 25, 2024
edited
Loading

Fixes#182.

We were always showing it:

{%translast_updated=last_updated|e%}Last updated on {{ last_updated }}.{%endtrans%}

Instead, we should check the variable first:

{%-iflast_updated%}{%translast_updated=last_updated|e%}Last updated on {{ last_updated }}.{%endtrans%}{%-endif%}

This is also what Sphinx does:

https://github.com/sphinx-doc/sphinx/blob/2e05fd2ffe70b2cfd48bdb9e35eecac43b46637d/sphinx/themes/basic/layout.html#L211-L213

Also add some newlines around otherif blocks to make them clearer.

@hugovkhugovk added the bug labelMar 25, 2024
@hugovkhugovk changed the titleOnly show 'Last updated on ...' when last_updated definedOnly show 'Last updated on ...' whenlast_updated definedMar 25, 2024
@hugovkhugovk merged commit439dd95 intopython:mainMar 25, 2024
@hugovkhugovk deleted the fix-last-updated-on-none branchMarch 25, 2024 15:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ezio-melottiezio-melottiezio-melotti approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Footer: "Last updated on None"
2 participants
@hugovk@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp