Leoj03
August 16, 2019, 3:11pm
1
I have encountered some rather interesting problems in differing Hugo versions. I am running Ubuntu 18.04 (Bionic Beaver). The apt
version of Hugo is at 0.40.1, and the snap
version is at 0.57.1. I have two sites, one using the Universal theme and the other using the Startbootstrap Clean Blog theme. When using 0.40.1, the Startbootstrap site builds fine. The Universal site fails to build, giving the error
ERROR 2019/08/16 10:08:24 Error while rendering "home" in "": template: index.html:26:11: executing "index.html" at <partial "recent_post...>: error calling partial: template: partials/recent_posts.html:12:54: executing "partials/recent_posts.html" at <markdownify>: wrong number of args for markdownify: want 1 got 0
When using version 0.57.1, both sites build fine, but with both the blog posts on the front page disappear and are replaced with a single item that looks like a post and just says “Blogs”. When clicked, it leads to the blog page. I generally use the snap
extended version.
Interesting… Now post the content of partials/recent_posts.html
and somebody will find the issue
By the way, I wouldn’t worry if an older version Hugo version fails to build and a newer has no issues. I would say that these themes just updated according to the updates in Hugo itself. 0.40 sounds eerily old. Like 2 years ago
which in Hugo years is like three to five generations. I had my first experiences with Hugo at 0.42. So if a theme fails and you have access to a newer version - relax, use the newer version, forget the older one.
I think there is a new mechanism in newer versions (see modules) that will enable Hugo themes to tell you which Hugo version they require at least. 0.40 - old. Very old.
Leoj03
August 16, 2019, 3:29pm
3
I did find this which seems to be the same thing as my 0.57.1 issue. I know 0.40 is old, but it’s what’s in the 18.04 repositories, and like I said, I generally use the Snap version. I just tried installing the Apt version to see if it changed anything.
Here’s recent_posts.html
:
{{ if isset .Site.Params "recent_posts" }}
{{ if .Site.Params.recent_posts.enable }}
<section class="bar background-white no-mb">
<div class="container">
<div class="col-md-12">
<div class="heading text-center">
<h2>{{ .Site.Params.recent_posts.title }}</h2>
</div>
<p class="lead">
{{ .Site.Params.recent_posts.subtitle | markdownify }}
</p>
<!-- *** BLOG HOMEPAGE *** -->
<div class="row">
{{ $posts := .Paginate (where .Data.Pages "Type" "blog") }}
{{ range first 4 $posts.Pages }}
<div class="col-md-3 col-sm-6">
<div class="box-image-text blog">
<div class="top">
<div class="image" style="overflow:hidden">
{{ if isset .Params "banner" }}
<img src="{{ .Site.BaseURL}}{{ .Params.banner }}" class="img-responsive" alt="" >
{{ else }}
<img src="{{ .Site.BaseURL}}img/placeholder.png" class="img-responsive" alt="">
{{ end }}
</div>
<div class="bg"></div>
<div class="text">
<p class="buttons">
<a href="{{ .Permalink }}" class="btn btn-template-transparent-primary"><i class="fa fa-link"></i> {{ i18n "readMore" }}</a>
</p>
</div>
</div>
<div class="content">
<h4><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
<p class="author-category">
{{ with .Params.author }}
{{ i18n "authorBy" }} <a href="#">{{ . }}</a>
{{ end }}
{{ i18n "publishedOn" }} {{ .Date.Format .Site.Params.date_format }}
</p>
<p class="intro">{{ .Summary }}</p>
<p class="read-more">
<a href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "continueReading" }}</a>
</p>
</div>
</div>
<!-- /.box-image-text -->
</div>
{{ end }}
</div>
<!-- /.row -->
<!-- *** BLOG HOMEPAGE END *** -->
</div>
</div>
<!-- /.container -->
</section>
<!-- /.bar -->
{{ end }}
{{ end }}
You can find instructions about what’s wrong with the above over here:
opened 09:07AM - 16 Aug 19 UTC
closed 07:35PM - 30 Sep 19 UTC
Due to the nature of the changes that were introduced in Hugo v.0.57.0 (briefly … described in https://github.com/gohugoio/hugoThemes/issues/678#issue-480803827) a great number of theme demos now display empty homepages and/or post lists that point to section lists (instead of individual posts).
The solution to the problem would be the use of [mainSections](https://gohugo.io/functions/where/#mainsections) for theme lists on the homepage (as we have been advocating for a while now) as well the following (or its variations) in list templates:
```
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate $pages }}
```
---
**[Hugo v.0.58.0](https://github.com/gohugoio/hugo/releases/tag/v0.58.0) was released on the 4th of September 2019 and the breaking changes to the `home.Pages` collection that were reverted in 0.57.2 have been re-introduced Theme authors need to issue the fixes described above if they wish to keep their themes listed in the Hugo Showcase.**
---
<h3>
```diff
- Broken themes will be removed around the end of September -
```
</h3>
Also note that **#668 is in progress** and **the guidelines for maintaining a theme in the Hugo Showcase are about to change**. Theme authors are encouraged to track this issue.
<h3>
```diff
- If you no longer plan to maintain a theme please let us know -
```
</h3>
Furthermore there is [a related notice in the forum](https://discourse.gohugo.io/t/hugo-themes-showcase-issue/20249) to alert theme authors about the breaking changes.
Below is the full list of affected themes (I have not included the few themes whose authors are working on a fix as mentioned in #678 ):
~~Midnight~~ theme is affected by another [issue](https://discourse.gohugo.io/t/modules-error-file-does-not-exist/20794/) and it will be kept in this repo until there is a resolution (even if its demo does not generate)
~~Hugo Future Imperfect Slim~~ fixed in pacollins/hugo-future-imperfect-slim@afbf3ccb
~~Yignyang~~ fixed in joway/hugo-theme-yinyang@5091a6c
~~Hugo Flex~~ fixed in de-souza/hugo-flex@0d64b46
~~Hugo Lamp~~ fixed in huyb1991/hugo-lamp@b4408fd
1. [Cocoa-EH](https://themes.gohugo.io/cocoa-eh-hugo-theme/) fix in progress see: https://github.com/mtn/cocoa-eh-hugo-theme/issues/138 @mtn
2. [Dream](https://themes.gohugo.io/hugo-theme-dream/) @g1eny0ung
~~Zen~~ fixed in frjo/hugo-theme-zen@a942441
~~Bingo~~ fixed in gundamew/hugo-bingo@ea9283f
~~OneDly Project~~ fixed in cdeck3r/OneDly-Theme@3302b93
~~Alpha Church~~ fixed (see #687 )
~~Minimage~~ fixed in d-kusk/minimage@959ef80
~~Tikva~~ fixed in geschke/hugo-tikva@af5722f
3. [Simple Blox](https://themes.gohugo.io/simpleblox/) @okabrionz
4. [Hurock](https://themes.gohugo.io/hurock/) @TiTi
~~Aether~~ fixed in josephhutch/aether@0cf324b
~~Binario~~ fixed in Vimux/Binario@9f5ca76
~~Newsprint~~ theme removed in #685
~~Indigo~~ fixed in AngeloStavrow/indigo@a824342
~~eiio~~ fixed in leonhe/hugo_eiio@cc47f86
~~Base 16~~ fixed in htdvisser/hugo-base16-theme@861b48a
~~Black & Light~~ fixed in davidhampgonsalves/hugo-black-and-light-theme@4168cd6
5. [Start Bootstrap Clean Blog](https://themes.gohugo.io/startbootstrap-clean-blog/) @UtkarshVerma
~~Niello~~ fixed in https://github.com/guangmean/Niello/commit/cc55110be275cb7ab6d0b19583afbb9a3433ad2a
~~Massively~~ fixed in https://github.com/curtistimson/hugo-theme-massively/pull/72
~~Hyde-Hyde~~ fixed as per htr3n/hyde-hyde@ad9701b
~~Techlog Simple~~ fixed in mazgi/hugo-theme-techlog-simple@fdf9ccb
~~Arabica~~ fixed in nirocfz/arabica@ae66e72
~~Ezhil~~ fixed in vividvilla/ezhil@3154483 and vividvilla/ezhil@bb28e76
6. [Yinwang](https://themes.gohugo.io/gohugo-theme-yinwang/) @chinanf-boy
~~Inkblotty~~ fixed in https://github.com/tosi29/inkblotty/commit/a2b99bdf71090428b52d5976288a83584ffb45a7
~~Paper~~ fixed in nanxiaobei/hugo-paper@68a57bb
~~Cayman~~ fixed in https://github.com/zwbetz-gh/cayman-hugo-theme/commit/c5c1915d3d2a69bda61860f3a7846f6601540292
7. [Athena](https://themes.gohugo.io/athena-hugo-theme/) fix in progress see: https://github.com/mtn/athena-hugo-theme/issues/4
~~Manis~~ fixed in yursan9/manis-hugo-theme@30ff78a
~~Ghostwriter~~ fixed in jbub/ghostwriter@6e9eabc
8. [Hugo Nuo](https://themes.gohugo.io/hugo-nuo/) @laozhu
~~Even~~ fixed in olOwOlo/hugo-theme-even@5a3e559
9. [Hyde Y](https://themes.gohugo.io/hyde-y/) @enten
~~Air~~ fixed in syui/hugo-theme-air@3bc80b5
~~Simplicity~~ fixed in #687
~~Beautiful Hugo~~ fixed in halogenica/beautifulhugo@1d75ccd
10. [Changelog Theme](https://themes.gohugo.io/hugo-changelog-theme) @jsnjack
~~Dusky Neon Potato~~ fix in VVelox/hugo-dusky-neon-potato@a9bd193
10. [Blackburn](https://themes.gohugo.io/blackburn/) @yoshiharuyamashita
~~Paper CSS~~ fixed in zwbetz-gh/papercss-hugo-theme@698fe6a
~~Hyde~~ fixed see: spf13/hyde@3080504
11. [Zozo](https://themes.gohugo.io/hugo-theme-zozo/) @zhoukai620
~~Techdoc~~ whitelisted in #691
~~Adam & Eve~~ fixed in blankoworld/hugo_theme_adam_eve@e925bcd
~~Charaka~~ fixed in natarajmb/charaka-hugo-theme@de01c10
~~Hugo Apps Theme~~ fixed in #687
12. [Mondrian](https://themes.gohugo.io/hugo-mondrian-theme/) @redraw
13. [Spectrum](https://themes.gohugo.io/spectrum/) @silvanocerza
~~XMin~~ fixed in yihui/hugo-xmin@6123be2
14. [Pickles](https://themes.gohugo.io/hugo_theme_pickles/) @mismith0227
15. [Castanet](https://themes.gohugo.io/castanet/) the author [replied](https://github.com/gohugoio/hugoThemes/issues/682#issuecomment-522228066) - (also see https://github.com/gohugoio/hugoThemes/pull/687/commits/863c6778b434733573cc1c1b243ca050bbc13845) @mattstratton
16. [Hamburg](https://themes.gohugo.io/hugo-theme-hamburg/) @hauke96
~~Pacman~~ fixed in coderzh/hugo-pacman-theme@ea7d497
16. [Shapez](https://themes.gohugo.io/shapez-theme/) @djuelg
17. [Dream Plus](https://themes.gohugo.io/hugo-dream-plus/)
~~Lanyon~~ fixed in tummychow/lanyon-hugo@33ecb36
18. [Hugo NES Classic](https://themes.gohugo.io/hugo-nes-classic/) (notified author in https://github.com/rjayasinghe/hugo-nes-classic/issues/2 because it was impossible to tag him here)
~~Pixyll~~ fixed in azmelanar/hugo-theme-pixyll@c25f592
~~[Minimal Bootstrap Hugo Theme~~ fixed in zwbetz-gh/minimal-bootstrap-hugo-theme@634920a
~~Kiss~~ fixed in ribice/kiss@7ea3147
19. [Hugo Bootstrap Premium](https://themes.gohugo.io/hugo-bootstrap-premium/) @appernetic
~~Hugo Dusk~~ fixed in gyorb/hugo-dusk@b0d2bc7
~~Hugo W3 Simple~~ fixed in jesselau76/hugo-w3-simple@601d63c
20. [Bleach](https://themes.gohugo.io/bleach-theme/) @digivend
~~Now UI~~ fixed in cboettig/hugo-now-ui@82c3eb0
~~Travelify~~ fixed in balaramadurai/hugo-travelify-theme@65f7a10 - also whitelisted in #691
21. [dockDock](https://themes.gohugo.io/docdock/) @vjeantet
~~hugo h5bp~~ fixed in garvincasimir/hugo-h5bp-simple@f6b0f3a
~~Herring Cove~~ removed in e736afe
~~Hugo Minimalist SPA~~ fixed in #683
~~Lithium~~ fixed in jrutheiser/hugo-lithium-theme@fba4893
~~Beg~~ Unmaintained theme removed in #690
~~81. Den~~ fixed in shaform/hugo-theme-den@553b158 - (also see: #687 )
~~Robotico~~ whitelisted in #691
22. [Simple Hugo Theme](https://themes.gohugo.io/simple-hugo-theme/) @Xzya
~~Silhouette~~ fixed in mattbutton/silhouette-hugo@be305fb
~~Octopress~~ fixed in parsiya/Hugo-Octopress@3f80dea
23. [Hugo Bootstrap](https://themes.gohugo.io/hugo-bootstrap/) @Xzya
~~Bootstrap BP~~ fixed in spech66/bootstrap-bp-hugo-theme@68314b7
24. [Hugo multi Bootswatch](https://themes.gohugo.io/hugo-multi-bootswatch/) @mpas
~~Oldnew Mashup~~ whitelisted in #691
~~Er~~ fixed in lingxz/er@ebdb186
~~Hugo Grapes~~ fixed in shankar/hugo-grapes@af4af64
~~Hugo Classic~~ fixed in goodroot/hugo-classic@bafd650
~~Hugo Now~~ fixed in mikeblum/hugo-now#5
~~Dark Simplicity~~ fix in kritoke/darksimplicity@e00dc41 and kritoke/darksimplicity@d516015
~~Internet Weblog~~ fixed in jnjosh/internet-weblog@2fa06ec
~~Simple A~~ fixed in AlexFinn/simple-a@b22f385
24. [Finite](https://themes.gohugo.io/hugo-finite/) @lambdafu
~~Rusty~~ theme removed in #699
25. [Code Editor](https://themes.gohugo.io/hugo-code-editor-theme/) @aubm
~~Hugo Cards~~ the way this theme was refactored in bul-ikana/hugo-cards@e3248ef is not ideal, so I had to send #706 to cover this setup in the Build Script.
26. [Phugo](https://themes.gohugo.io/phugo/) @aerohub
~~Cocoa~~ unmaintained removed in #680
~~Potato Dark~~ fixed in https://github.com/surajmandalcell/potato-dark/pull/7/commits/241dea801d992328753eda8c6e40505c26fb43ea
30. [AllinOne](https://themes.gohugo.io/allinone/) @orianna-zzo
31. [Basics](https://themes.gohugo.io/basics/) @arjunkrishnababu96
32. [One](https://themes.gohugo.io/hugo-theme-one/) @resugary
~~Slim~~ fixed in https://github.com/zhe/hugo-theme-slim/commit/f666effe196af5f9a578f9b652229c96803a5b98
~~BeyondNothing~~ fixed in https://github.com/salcan/BeyondNothing/commit/2931c2abf0964f1053c4776c5288ed3f02a7fe79
33. [Martial Paper](https://themes.gohugo.io/martial-paper/) @pedrodude
34. [Would have been cool in the 80s](https://themes.gohugo.io/would-have-been-cool-in-the-80s/) @pedrodude
35. [Sublime Hugo](https://themes.gohugo.io/sublime-hugo-theme/) @dt801ts
36. [Classless](https://themes.gohugo.io/classless-hugo/) @fiatjaf
~~Landing Page~~ unmaintained removed in #692
37. [Bootie Docs](https://themes.gohugo.io/bootie-docs/) @progrhyme
~~Hugo Frais~~ fixed in the2ne/hugo-frais@cd01972 and the2ne/hugo-frais@056db8f
38. [Tracks](https://themes.gohugo.io/hugo-tracks-theme/) @ageekymonk
39. [Phlat](https://themes.gohugo.io/hugo-phlat-theme/) @nraboy
~~Wave~~ fixed in syui/hugo-theme-wave@68e2aed
~~Paperback~~ fixed in dashdashzako/paperback@9b58eba
~~onetwothree~~ fixed in https://github.com/schollz/onetwothree/pull/12
40. [Casper](https://themes.gohugo.io/casper/) @vjeantet
41. [Casper Two](https://themes.gohugo.io/hugo-casper-two/) @eueung
123. [Simpledoc Theme](https://themes.gohugo.io/hugo-simpledoc-theme/)
~~Elephants~~ fixed in meibenny/elephants@7c40d2c
~~Reveal JS~~ whitelisted in #691
126. [Luxury Theme](https://themes.gohugo.io/hugo-luxury-theme/)
~~Gentoo~~ removed in https://github.com/gohugoio/hugoThemes/commit/7fdec13c4a1ebb93dacb3ac64bc5f92fceb3f586
128. [Retroful Hugo](https://themes.gohugo.io/retrofulhugo/) @5ARMALE
129. [Strata](https://themes.gohugo.io/strata/) - **the maintainer is aware**
~~Liquorice~~ fixed in eliasson/liquorice@4f2af3b
~~Hikari~~ fixed in digitalcraftsman/hugo-hikari-theme@314516a
132. [Minimalist](https://themes.gohugo.io/hugo-minimalist/) - incorrect list - **the maintainer is aware**
~~Journal~~ removed in #694
134. [GitHub Project Page](https://themes.gohugo.io/github-project-landing-page/) @nsomar
135. [Red Lounge](https://themes.gohugo.io/redlounge/) @tmaiaroto
136. [Steam](https://themes.gohugo.io/steam/) - **the maintainer is aware**
137. [AMP](https://themes.gohugo.io/amp/) @pdevty
~~Light Hugo~~ fixed in tblyler/light-hugo@5ef28a4
139. [Icarus](https://themes.gohugo.io/hugo-icarus/) - **the maintainer is aware**
140. [Hugo Geo](https://themes.gohugo.io/hugo-geo/) @alexurquhart
141. [GoHugo AMP](https://themes.gohugo.io/gohugo-amp/) @wildhaber
142. [NeXT](https://themes.gohugo.io/next/) @leopku
~~Hugo Scroll~~ unmaintained and removed in #692
~~Hugo Uno~~ unmaintained and removed in #693
~~Hugo Zen~~ unmaintained and removed in #693
146. [Heather Hugo](https://themes.gohugo.io/heather-hugo/) @hbpasti
~~Remark Twemoji~~ removed in #690
~~Remark Minion~~ removed in #690
~~Nixon~~ removed in d46f2d5 also see https://github.com/gohugoio/hugoThemes/issues/682#issuecomment-524798374
150. [Darkdoc](https://themes.gohugo.io/hugo-darkdoc-theme/) @adejoux
~~Twenty Fourteen~~ fixed in jaden/twentyfourteen@89e9097
152. [Angel's Ladder](https://themes.gohugo.io/angels-ladder/) @tanksuzuki
153. [Hugo Bootswatch](https://themes.gohugo.io/hugo-bootswatch/) @nilproductions
154. [Rocktopus](https://themes.gohugo.io/rocktopus/) @esell
~~Gindoro~~ removed in #690
156. [Projecthub](https://themes.gohugo.io/projecthub/)
157. [Tachyons](https://themes.gohugo.io/tachyons/) @marloncabrera
~~Shiori~~ removed in #690
159. [Universal Theme](https://themes.gohugo.io/hugo-universal-theme/) @devcows
Leoj03
August 16, 2019, 10:08pm
5
@alexandros Using that as a reference I managed to find and fix the problem with both themes. Thanks!
1 Like