Closed onedrawingperday closed 5 years ago
I believe I have fixed https://themes.gohugo.io/hugo-theme-zen/ now.
Thanks for the work keeping the Themes section updated and relevant!
@frjo Thanks the theme demo will be fixed when @digitalcraftsman updates the themes in the repo.
The themes have been updated.
The real impact of Hugo 0.57 breaking changes is even bigger than 155 themes, which stated above.
What about broken taxonomies list pages? As an example, Mainroad. This theme is not listed (because homepage works), but it's affected too. I am sure this is not a complete list of affected themes. I have three themes in themes.gohugo.io and all of them affected somehow: Binario, blank, Mainroad. And worst of all, it was done without notification or any warning.
I'll update my themes ASAP, but probably tomorrow, not today.
I'll update my themes ASAP, but probably tomorrow, not today.
There is a one month window so take your time.
Also please note that #668 is in progress and I suggest you track it because the guidelines for maintaining a theme in the Hugo Showcase are about to change..
We are a very small team and this is the last time that I spend an exorbitant amount of time running around notifying 155 people.
Thanks.
I've created a fix for the Massively theme and would appreciate a review if anyone has chance:
https://github.com/curtistimson/hugo-theme-massively/pull/72
Thanks
@onedrawingperday we could use Hugo's Twitter account to reach out to theme maintainers. Just let me know how to inform them in 280 characters.
@digitalcraftsman
If you could tweet the following:
Theme authors you may want to check out https://github.com/gohugoio/hugoThemes/issues/682
to see if your theme is currently broken in Hugo v.057.1
FWIW, and I know I'm probably in the minority here, I do not have a Twitter account. Please also consider using email, or a blog or something I can subscribe to. Alternatively, has anyone considered stabilizing Hugo or at least getting on some sort of release cycle so that theme authors have a chance to fix things before breaking changes are released? Having them just kind of spring up after a release if you're not heavily involved in Hugo development doesn't feel great.
@digitalcraftsman
Also note that currently I have hit a GitHub limit. It seems that only 50 user mentions are allowed per post. So I cannot notify more people in the first post of this topic and it will not be practical for me to open issues in the different theme repositories or mention them in comments further down.
I have contacted GitHub support for this, hopefully they will do something about it.
So I m giving this a rest until tomorrow.
@SamWhited: FWIW, and I know I'm probably in the minority here, I do not have a Twitter account.
Twitter is only an additional channel to reach a wider audience. I think it's more effective and less effort to broadcast this information before contacting the developers individually. Of course we we probably won't reach every developer this way.
Thank you for your hard work, @onedrawingperday ! I'll fix my theme ASAP
@SamWhited
We are currently working on #668 and when that issue is resolved, we will put in writing that authors will need to keep an eye on current Hugo developments for making sure that a theme is functional with the latest version.
We always give theme developers a 30 day period for fixing issues and up until now I have been contacting people for problems out of my own time.
Breaking changes of the sort that happened in Hugo 0.57 are rare. Typically there is some kind of deprecation warning but in this case the changes in Pages Collections for the homepage etc. were done at once due to the development of new features like Cascading Front Matter.
@SamWhited: Alternatively, has anyone considered stabilizing Hugo or at least getting on some sort of release cycle so that theme authors have a chance to fix things before breaking changes are released?
@bep is the lead developer behind Hugo. He should know best if a stable release cycle can be established and how the roadmap of Hugo will look like (incl. deprecations in future releases.)
To cite him from https://github.com/gohugoio/hugoThemes/issues/678#issuecomment-521554768:
We could probably have dropped this home.Pages change, but since we had to introduce some other related breaking changes, I thought it was better to take all the pain at once ...
@onedrawingperday I just posted a tweet: https://twitter.com/GoHugoIO/status/1162382902937735168
Twitter is only an additional channel to reach a wider audience. I think it's more effective and less effort to broadcast this information before contacting the developers individually. Of course we we probably won't reach every developer this way.
Yes, contacting each developer individually doesn't seem sustainable. That's why I suggested a mailing list or blog, everyone can use RSS or everyone has an email, but not everyone has a Twitter. Email is universal, so in my mind it's probably the best place to start.
This may also just be me, but just from reading the docs on the where page and from this post and the issue, I don't actually understand how to fix my theme. You suggest where site.RegularPages "Type" "in" site.Params.mainSections
but that gives me a list of sections (whereas before my blog home page was showing a list of pages). Should I be paginating over all pages in all those sections? Should I still filter on a hardcoded type within those sections? I don't really understand how a blog that before was just displaying pages of type "posts" or some other hardcoded thing can be created using this new mechanism.
@onedrawingperday Thanks for informing, I'll fix my theme "Tikva" in the next days.
Kind regards, Ralf
@SamWhited
I will look into your theme and let you know what you need to do in a bit.
@SamWhited
Apparently with the way that you have constructed your theme changing layouts/index.html
does not make a difference.
To render the posts on the index page and every other list page you need to change line 2 of layouts/partials/header.html
to the following:
{{ $pages := .Pages }}
{{ if .IsHome }}
{{ $pages = .Site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate $pages }}
I have not used mainSections logic in your templates because this header partial is present everywhere.
@onedrawingperday thanks; I still don't understand what's going on here but maybe I'm just tired. I'll just make this change.
Oh, no, @onedrawingperday that doesn't appear to work. That now iterates over every single page on my site, not just blog posts or things in the mainSections list if I define it.
EDIT: Or am I supposed to apply the "type in mainSections" thing to that? I really don't understand why that logic would or would not be used because the header partial exists everywhere.
I believe I have fixed Den, but actually the demo seems a bit strange because some pages throw 404 errors. But I cannot reproduce this problem on my machine.
I don't fully understand this change, but I have fixed the XMin theme via https://github.com/yihui/hugo-xmin/commit/6123be24bf4a7517ae9cbf05882b62f52684d16d anyway. Thanks for notifying me!
@onedrawingperday thank you for notification! I will check mine.
I understand the desire to improve and sometimes choices needed to be made. However this breakage is a bit scary and not only affecting theme author. It is affecting end users.
Hugo is stable. As a hugo user, once I pick a theme and get my workflow straighten out, I almost never visit hugo forum again, and never have to update the theme. So there is no way I know the new version is breaking stuff. On Mac, I just did brew upgrade one day. Then once I run hugo again, the home page listing is gone. I spent like 2hr to pin point the issue and rolled back 0.56.3.
If you count people doing stuff on linux with automatic update or even with some kind of CI, it will be a big mess for many many people.
@SamWhited
mainSections are detected by Hugo internally and are arranged based on the number of content files within each section.
Therefore it was not needed to specify them in the exampleSite/config.toml
Your changes under /layouts/_default/list.html
are fine.
Regarding the code block in /partials/header.html/
-as it is now- I will break it down and try to make it clear:
{{- if not .IsPage -}}
{{- $pages := .Pages }}
{{- if .IsHome }}
{{- $pages = .Site.RegularPages }}
{{- end }}
{{- $paginator := .Paginate (where $pages "Type" "in" site.Params.mainSections) -}}
{{- end -}}
Line 2: $pages := .Pages
setting a variable that contains all Pages collection
Line 3: but check for homepage if .IsHome
because:
Line 4: That variable needs to contain only .Site.RegularPages
because this is the page collection for individual content pages for the homepage. Since Hugo 0.57 .Pages
will render section and nested section list pages on the homepage.
Line 5: The logic in this line is wrong. You will get pages from every mainSection regardless of what belongs in a specific section list. It is preferable to have this line as it was written above i.e.:
{{- $paginator := .Paginate $pages -}}
here $pages
are the .Pages
page collection which on section lists will behave as it used to (prior to Hugo 0.57) and it will return the content pages residing under each section.
If you prefer to use mainSections logic then it needs to be written like so:
{{- if .IsHome }}
{{- $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) -}}
{{- end }}
Note that above you need to specify site.RegularPages
and not $pages
within the .IsHome
condition because if you don't you will end up with a link to the section list Posts on your homepage.
So that the final code looks like this:
{{- if not .IsPage -}}
{{- $pages := .Pages }}
{{- if .IsHome }}
{{- $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) -}}
{{- end }}
{{- $paginator := .Paginate $pages -}}
{{- end -}}
Hope I made this clear. I tested the above with your latest commit and on my end I get the homepage list to render as it used to be.
@onedrawingperday I still don't understand what mainSections is or how it works, but this does appear to show the right pages. Thanks.
@onedrawingperday My themes affected by this have been fixed
https://github.com/zwbetz-gh/papercss-hugo-theme
https://github.com/zwbetz-gh/minimal-bootstrap-hugo-theme
https://github.com/zwbetz-gh/cayman-hugo-theme
@SamWhited
The whole idea of mainSections is to make themes flexible for users. In your theme you use a /post/
section. Typically we see constructs like the following in themes:
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "post") }}
And that is limiting end users because they may not want to use a /post/
section in their project but instead a /drawings/
section.
Before mainSections the end user would have to manually override the theme to make the paginator work like so: {{ $paginator := .Paginate (where .Site.RegularPages "Type" "drawing") }}
Since mainSections overriding is no longer needed because Hugo detects the top section internally and that is why for themes we recommend:
{{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
Anyway. There are further issues with your theme that are unrelated to this issue.
You will need to take care of these warnings at some point and before .Page.URL
is deprecated:
WARN 2019/08/17 00:15:47 .File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}
WARN 2019/08/17 00:15:47 .File.TranslationBaseName on zero object. Wrap it in if or with: {{ with .File }}{{ .TranslationBaseName }}{{ end }}
WARN 2019/08/17 00:15:47 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
The console messages are self explanatory. If you need help with these then please open a separate issue.
@onedrawingperday I don't even see those warnings if I run in verbose mode, where are you seeing that?
@SamWhited False alarm. Sorry I mixed up a log.
Anyway this wraps up your theme's issue. Once you push the suggested changes to the repo let me know so that I can mark your theme as fixed.
@onedrawingperday the theme has been updated and is fixed. I don't think I'm going to maintain this in the future though since this is the third or fourth time everything has been broken unexpectedly after a Hugo update, so I think I'll start looking for a more stable replacement. The theme does work for now, so feel free to keep it until the next major update or remove it as you prefer.
@SamWhited Since you do not intend to maintain this theme you shouldn't have wasted my time.
Your theme will be removed from this repo tomorrow.
Also do not contact me again.
acknowledging this, will probably go fix my theme tomorrow.
is there... a mailing list i should be on? proactively following hugo development is a very high bar to ask for. it sucks to have to chase down dozens of theme developers, but demanding dozens of theme developers chase hugo also sucks. we're all doing this for free, surely we can find a compromise. i'd be fine with getting pinged on an issue like we're doing here. is that what will happen in the future?
My theme is fixed by this commit https://github.com/yursan9/manis-hugo-theme/commit/30ff78a8e71270d61e4058b6f4cdada904b735f3
Running 0.57.1 which is supposed to have the fixed logic for mainSections
, but I am still being forced to define it in the config.toml
in order to have the pages show up. Lines 8-14 have been updated with Line 9 being changed to {{ $paginator := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
@shaform I confirm the fix. Also i plan to whitelist your theme so that there are no 404s.
However there are console warnings in your theme that you will need to address. The console messages below are self explanatory. If you need further help please open a separate issue:
==== PROCESSING hugo-theme-den ======
hugo-theme-den is whitelisted
Building site for theme hugo-theme-den using its own exampleSite to ../themeSite/static/theme/hugo-theme-den/
WARN 2019/08/17 09:04:02 Page's .Hugo is deprecated and will be removed in a future release. Use the global hugo function.
WARN 2019/08/17 09:04:02 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.
@pacollins The problem you describe is related to the specific architecture of your theme. Please open a support ticket in the forum: https://discourse.gohugo.io/
cc: @digitalcraftsman
Note that on top of the GitHub user mentions limit that I have hit and mentioned above as of right now I can no longer edit the first comment of this GitHub issue to keep track of this issue's progress.
I have contacted GitHub support again but until I get a reply (which I haven't) I really can't do much, since at the moment GitHub makes it very hard for me to manage this issue.
cc: @digitalcraftsman @bep
@onedrawingperday many thanks for your time and effort. I will fix hyde-hyde
and update soon.
@Leoj03 Thank you I have now tagged the author of the Universal Theme in this issue.
Thank you for letting us know about this, @onedrawingperday! I'll get to work on castanet. I noticed you mentioned https://github.com/gohugoio/hugoThemes/commit/863c6778b434733573cc1c1b243ca050bbc13845 - is this just an FYI or is it an problem?
is this just an FYI or is it an problem?
@mattstratton This is simply a reference for this repo. Please let me know once you issue a fix. Thanks.
Dear theme authors,
You may want to read the first post of this issue because unfortunately your theme is currently affected due to some breaking changes in Hugo 0.57.0
It was not possible to tag you in the original post due to GitHub's limit of 50 user mentions per post.
You will find all detailed instructions in the above link. If you have any questions feel free to ask we will be glad to answer.
Affected Themes
@onedrawingperday Thanks! I've fixed the warnings in https://github.com/shaform/hugo-theme-den/commit/a2b27584a0cba27849bba058875411a5c2170344.
Dear theme authors,
You may want to read the first post of this issue because unfortunately your theme is currently affected due to some breaking changes in Hugo 0.57.0
It was not possible to tag you in the original post due to GitHub's limit of 50 user mentions per post.
You will find all detailed instructions in the above link. If you have any questions feel free to ask we will be glad to answer.
Affected Themes
@onedrawingperday My themes affected by this have been fixed. https://github.com/guangmean/Niello
Should be fixed for 3) Bootstrap BP @spech66
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 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:
Hugo v.0.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.```diff - Broken themes will be removed around the end of September - ```
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.
```diff - If you no longer plan to maintain a theme please let us know - ```
Furthermore there is a related notice in the forum 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 ):
Midnighttheme is affected by another issue and it will be kept in this repo until there is a resolution (even if its demo does not generate)Hugo Future Imperfect Slimfixed in pacollins/hugo-future-imperfect-slim@afbf3ccbYignyangfixed in joway/hugo-theme-yinyang@5091a6cHugo Flexfixed in de-souza/hugo-flex@0d64b46Hugo Lampfixed in huyb1991/hugo-lamp@b4408fdZenfixed in frjo/hugo-theme-zen@a942441Bingofixed in gundamew/hugo-bingo@ea9283fOneDly Projectfixed in cdeck3r/OneDly-Theme@3302b93Alpha Churchfixed (see #687 )Minimagefixed in d-kusk/minimage@959ef80Tikvafixed in geschke/hugo-tikva@af5722fAetherfixed in josephhutch/aether@0cf324bBinariofixed in Vimux/Binario@9f5ca76Newsprinttheme removed in #685Indigofixed in AngeloStavrow/indigo@a824342eiiofixed in leonhe/hugo_eiio@cc47f86Base 16fixed in htdvisser/hugo-base16-theme@861b48aBlack & Lightfixed in davidhampgonsalves/hugo-black-and-light-theme@4168cd6Niellofixed in https://github.com/guangmean/Niello/commit/cc55110be275cb7ab6d0b19583afbb9a3433ad2aMassivelyfixed in https://github.com/curtistimson/hugo-theme-massively/pull/72Hyde-Hydefixed as per htr3n/hyde-hyde@ad9701bTechlog Simplefixed in mazgi/hugo-theme-techlog-simple@fdf9ccbArabicafixed in nirocfz/arabica@ae66e72Ezhilfixed in vividvilla/ezhil@3154483 and vividvilla/ezhil@bb28e76Inkblottyfixed in https://github.com/tosi29/inkblotty/commit/a2b99bdf71090428b52d5976288a83584ffb45a7Paperfixed in nanxiaobei/hugo-paper@68a57bbCaymanfixed in https://github.com/zwbetz-gh/cayman-hugo-theme/commit/c5c1915d3d2a69bda61860f3a7846f6601540292Manisfixed in yursan9/manis-hugo-theme@30ff78aGhostwriterfixed in jbub/ghostwriter@6e9eabcEvenfixed in olOwOlo/hugo-theme-even@5a3e559Airfixed in syui/hugo-theme-air@3bc80b5Simplicityfixed in #687Beautiful Hugofixed in halogenica/beautifulhugo@1d75ccdDusky Neon Potatofix in VVelox/hugo-dusky-neon-potato@a9bd193Paper CSSfixed in zwbetz-gh/papercss-hugo-theme@698fe6aHydefixed see: spf13/hyde@3080504Techdocwhitelisted in #691Adam & Evefixed in blankoworld/hugo_theme_adam_eve@e925bcdCharakafixed in natarajmb/charaka-hugo-theme@de01c10Hugo Apps Themefixed in #687XMinfixed in yihui/hugo-xmin@6123be2Pacmanfixed in coderzh/hugo-pacman-theme@ea7d497Lanyonfixed in tummychow/lanyon-hugo@33ecb36Pixyllfixed in azmelanar/hugo-theme-pixyll@c25f592[Minimal Bootstrap Hugo Themefixed in zwbetz-gh/minimal-bootstrap-hugo-theme@634920aKissfixed in ribice/kiss@7ea3147Hugo Duskfixed in gyorb/hugo-dusk@b0d2bc7Hugo W3 Simplefixed in jesselau76/hugo-w3-simple@601d63cNow UIfixed in cboettig/hugo-now-ui@82c3eb0Travelifyfixed in balaramadurai/hugo-travelify-theme@65f7a10 - also whitelisted in #691hugo h5bpfixed in garvincasimir/hugo-h5bp-simple@f6b0f3aHerring Coveremoved in e736afeHugo Minimalist SPAfixed in #683Lithiumfixed in jrutheiser/hugo-lithium-theme@fba4893BegUnmaintained theme removed in #69081. Denfixed in shaform/hugo-theme-den@553b158 - (also see: #687 )Roboticowhitelisted in #691Silhouettefixed in mattbutton/silhouette-hugo@be305fbOctopressfixed in parsiya/Hugo-Octopress@3f80deaBootstrap BPfixed in spech66/bootstrap-bp-hugo-theme@68314b7Oldnew Mashupwhitelisted in #691Erfixed in lingxz/er@ebdb186Hugo Grapesfixed in shankar/hugo-grapes@af4af64Hugo Classicfixed in goodroot/hugo-classic@bafd650Hugo Nowfixed in mikeblum/hugo-now#5Dark Simplicityfix in kritoke/darksimplicity@e00dc41 and kritoke/darksimplicity@d516015Internet Weblogfixed in jnjosh/internet-weblog@2fa06ecSimple Afixed in AlexFinn/simple-a@b22f385Rustytheme removed in #699Hugo Cardsthe 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.Cocoaunmaintained removed in #680Potato Darkfixed in https://github.com/surajmandalcell/potato-dark/pull/7/commits/241dea801d992328753eda8c6e40505c26fb43eaSlimfixed in https://github.com/zhe/hugo-theme-slim/commit/f666effe196af5f9a578f9b652229c96803a5b98BeyondNothingfixed in https://github.com/salcan/BeyondNothing/commit/2931c2abf0964f1053c4776c5288ed3f02a7fe79Landing Pageunmaintained removed in #692Hugo Fraisfixed in the2ne/hugo-frais@cd01972 and the2ne/hugo-frais@056db8fWavefixed in syui/hugo-theme-wave@68e2aedPaperbackfixed in dashdashzako/paperback@9b58ebaonetwothreefixed in https://github.com/schollz/onetwothree/pull/12Elephantsfixed in meibenny/elephants@7c40d2cReveal JSwhitelisted in #691Gentooremoved in https://github.com/gohugoio/hugoThemes/commit/7fdec13c4a1ebb93dacb3ac64bc5f92fceb3f586Liquoricefixed in eliasson/liquorice@4f2af3bHikarifixed in digitalcraftsman/hugo-hikari-theme@314516aJournalremoved in #694Light Hugofixed in tblyler/light-hugo@5ef28a4Hugo Scrollunmaintained and removed in #692Hugo Unounmaintained and removed in #693Hugo Zenunmaintained and removed in #693Remark Twemojiremoved in #690Remark Minionremoved in #690Nixonremoved in d46f2d5 also see https://github.com/gohugoio/hugoThemes/issues/682#issuecomment-524798374Twenty Fourteenfixed in jaden/twentyfourteen@89e9097Gindororemoved in #690Shioriremoved in #690