hugo-book
hugo-book copied to clipboard
add outdatedInfoWarning
Like this:
# Display a message at the beginning of an article to warn the readers that it's content may be outdated.
# 在文章开头显示提示信息,提醒读者文章内容可能过时。
[params.outdatedInfoWarning]
enable = false
hint = 30 # Display hint if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示提醒
warn = 180 # Display warning if the last modified time is more than these days ago. # 如果文章最后更新于这天数之前,显示警告
https://github.com/olOwOlo/hugo-theme-even/blob/564697987de962672112b910422682eb6f9c26ba/exampleSite/config.toml
Hi!
You can try to add layouts/partials/docs/inject/content-before.html
template to add it to your pages. not sure if it worth to add to default tempaltes.
How can I use hints in content-before.html ? @alex-shpak
Neither of these works.
{{<hint info>}}
outdatedInfoWarning hints
{{</hint>}}
<blockquote class="book-hint info">
hint info
</blockquote>
Hm, I would expect later example to work, I can check.
You need to wrap blockquote
into markdown
class
<div class="markdown">
<blockquote class="book-hint info">
hint info
</blockquote>
</div>
@alex-shpak This works fine, thank you.
You need to wrap
blockquote
intomarkdown
class<div class="markdown"> <blockquote class="book-hint info"> hint info </blockquote> </div>
How can I get the Article-Update-Time from layouts/partials/docs/inject/content-before.html
using JavaScript more easily?