32356e4e Fix typo in header of shortcode-templates.md c8f1a2d2 Correct code example for index template function bfa6a55d Escape code fencing ff8b2f99 Fix typos in deployment with wercker tutorial 557c36e8 theme: Merge commit '7fbb4bed25001182bfeb91f79db0f0c1936582ee' 7fbb4bed Squashed 'themes/gohugoioTheme/' changes from 7dd8a302..ca53082d ce31cee0 Add "See Also" config 158cee1b Make the tags into keywords 61600be6 Add a note to the related section 49edb5a2 Relase 0.27.1 c9bbc001 releaser: Add release notes to /docs for release of 0.27.1 213c6c3b Add bugs poster 8b4590cd Add KeyCDN integration tutorial 2b277859 Add tutorial videos to several docs pages 950fef1f Update roadmap to link to the correct milestones page 496f5bf6 Rename relnotes d6f9378d Bump Netlify versions to 0.27 087fde7f Update 0.27 release notes 603f94ae docs: Document Related Content 3790f6a3 releaser: Bump versions for release of 0.27 0948868c releaser: Add release notes to /docs for release of 0.27 git-subtree-dir: docs git-subtree-split: 32356e4eabe357ae914f4d1d59e8ae31ce936723
6.5 KiB
date: 2017-09-11 title: "Hugo 0.27: Fast and Flexible Related Content!" description: "Makes it easy to add "See Also" sections etc. to your site." categories: ["Releases"] images:
- images/blog/hugo-27-poster.png
Hugo 0.27
comes with fast and flexible Related Content (3b4f17bb @bep #98). To add this to your site, put something like this in your single page template:
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
The above translates to list the five regular pages mostly related to the current page. See the Related Content Documentation for details and configuration options.
This release represents 37 contributions by 9 contributors to the main Hugo code base.
@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @moorereason, @yihui, and @oneleaftea for their ongoing contributions.
And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Many have also been busy writing and fixing the documentation in hugoDocs, which has received 44 contributions by 30 contributors. A special thanks to @bep, @sdomino, @gotgenes, and @digitalcraftsman for their work on the documentation site.
Hugo now has:
- 19464+ stars
- 455+ contributors
- 178+ themes
Notes
- We now only strip p tag in
markdownify
if there is only one paragraph. This allows blocks of paragraphs to be "markdownified" 33ae10b6 @bep #3040
Enhancements
Templates
- Add
time.Duration
andtime.ParseDuration
template funcs f4bf2141 @bep #3828 - Add
cond
(ternary) template func 0462c96a @bep #3860 - Prepare for template metrics d000cf60 @bep
- Add
strings.TrimLeft
andTrimRight
7674ad73 @moorereason - compare, hugolib, tpl: Add
Eqer
interface 08f48b91 @bep #3807 - Only strip p tag in
markdownify
if only one paragraph 33ae10b6 @bep #3040 - Cleanup
strings.TrimPrefix
andTrimSuffix
29a2da05 @moorereason
Output
Core
- Implement "related content" 3b4f17bb @bep #98
- Add
Page.Equals
f0f49ed9 @bep - Rewrite
replaceDivider
to reduce memory allocation 71ae9b45 @bep
Other
- Set up Hugo release flow on
CircleCI
d2249c50 @bep #3779 - Maintain the scroll position if possible 7231d5a8 @yihui #3824
- Add an
iFrame
title to theYouTube
shortcode 919bc921 @nraboy - Remove the theme submodule from /docs ea2cc26b @bep #3791
- Add support for multiple config files via
--config a.toml,b.toml,c.toml
0f9f73cc @jgielstra - Render task list item inside
label
for correct accessibility c8257f8b @danieka #3303 - Normalize
UniqueID
between Windows & Linux 0abdeeef @Shywim