Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
👑 Hugo update!
v0.134.0 Release Notes
Hugo v0.134.0 brings render hooks for tables, ContentWithoutSummary, scoped content render and Obsidian style callout alerts.
ContentWithoutSummary and scoped content render
This release finally brings a
Page.ContentWithoutSummary
method. This has been a long sought after method where the use case is obvious: render the summary with a more button that renders the ... content without summary. To enable this we have reimplemented the content summary handling in Hugo. This consolidates the 3 summary types (auto
,manual
andfrontmatter
) – they are now all HTML. This is a slightly breaking change (manual
was plain text before), but the new behaviour should be much less confusing and easier to handle in the templates. If you want plain text, pipe it intoplainify
:{{ .Summary | plainify }}
.Before this release there was one instance of
.Content
for a given page, it was e.g. not possible to render a page's content slightly different (e.g. different heading levels) on the list pages or the home page. This release anables that with a newPage.Markup
with an optionalscope
argument.In the list template you would do something like this:
You can think of the custom scope
list
as a cache key: Multiple invocations on the same page with the same scope will give the same return value. You can now pass down some data or configuration to in.Page.Store
to the templates that render this markup (shortcodes, render hooks), or you can use the new globalhugo.Context.MarkupScope
function made for this purpose:Render hooks for tables
This has been a long sought after feature. Now you can have full control over how you render your Markdown tables with table render hooks.
Obsidian style callout alerts
Hugo
v0.133.0
added blockquote render hooks with GitHub styled alerts. We have since then gotten some feedback about extended alert syntax in Obsidian, and in Hugov0.134.0
we now support both.Bug fixes
Improvements
Dependency Updates
Documentation