Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibilité avec Hugo v0.111.0+ #9

Open
thbar opened this issue May 10, 2023 · 3 comments
Open

Incompatibilité avec Hugo v0.111.0+ #9

thbar opened this issue May 10, 2023 · 3 comments

Comments

@thbar
Copy link
Contributor

thbar commented May 10, 2023

A partir de la v0.111.0, le template "google_news" a été supprimé (gohugoio/hugo@66f94b4). Or il est utilisé par notre template, ou en tout cas la version du template qu'on utilise en submodule.

Cela casse le rendu.

Pour l'instant on n'est pas coincés: la version est fixée par la build Netlify, et peut être overridée (si ça veut bien marcher) via HUGO_VERSION.

Je vais toutefois aller voir la tête du template et si il a évolué.

EDIT: le template a bien évolué pour intégrer ce changement. Par contre il y a beaucoup de changements, la comparaison est grosse (adityatelange/hugo-PaperMod@8021be2...bacb763), et la toute dernière version du template n'est pas compatible avec Hugo v0.85.0 qui est utilisé en production.

Je prépare un ticket pour faire une upgrade plus graduelle.

Ancienne enquête

Sur la production j'ai au niveau des logs:

11:33:31 AM: Starting post processing
11:33:30 AM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
11:33:31 AM:                    | FR
11:33:31 AM: -------------------+------
11:33:31 AM: Skipping HTML post processing
11:33:31 AM:   Pages            |  41
11:33:31 AM:   Paginator pages  |   0
11:33:31 AM:   Non-page files   | 120
11:33:31 AM:   Static files     |   1
11:33:31 AM: Post processing - header rules
11:33:31 AM:   Processed images |   0
11:33:31 AM:   Aliases          |   9
11:33:31 AM:   Sitemaps         |   1
11:33:32 AM: Post processing - redirect rules
11:33:31 AM:   Cleaned          |   0
11:33:31 AM: Total in 349 ms

En local, j'ai:

Start building sites … 
hugo v0.111.3+extended darwin/arm64 BuildDate=unknown
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "term": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "HTML" for kind "term": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/05/10 16:22:25 found no layout file for "JSON" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

                   | FR  
-------------------+-----
  Pages            | 18  
  Paginator pages  |  0  
  Non-page files   | 60  
  Static files     |  1  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 88 ms

Il n'y a pas d'index général HTML généré, notamment.

Commande tree
❯ tree
.
├── archives
│   └── index.html
├── categories
│   └── index.xml
├── index.xml
├── logo.png
├── normes
│   ├── index.xml
│   ├── netex
│   │   ├── accessibilité
│   │   │   ├── index.html
│   │   │   └── media
│   │   │       ├── image1.svg
│   │   │       ├── image10.svg
│   │   │       ├── image11.svg
│   │   │       ├── image12-1.png
│   │   │       ├── image12-2.png
│   │   │       ├── image12-3.png
│   │   │       ├── image12.svg
│   │   │       ├── image13.png
│   │   │       ├── image14.svg
│   │   │       ├── image15.svg
│   │   │       ├── image16.svg
│   │   │       ├── image17.svg
│   │   │       ├── image2.jpeg
│   │   │       ├── image3.png
│   │   │       ├── image4.png
│   │   │       ├── image5.png
│   │   │       ├── image6.jpeg
│   │   │       ├── image7.jpeg
│   │   │       ├── image8.svg
│   │   │       └── image9.svg
│   │   ├── arrets
│   │   │   ├── index.html
│   │   │   └── media
│   │   │       ├── image1.png
│   │   │       ├── image2.png
│   │   │       └── image3.png
│   │   ├── elements_communs
│   │   │   ├── index.html
│   │   │   └── media
│   │   │       ├── image1.svg
│   │   │       ├── image10.svg
│   │   │       ├── image11.svg
│   │   │       ├── image12.svg
│   │   │       ├── image13.svg
│   │   │       ├── image14.svg
│   │   │       ├── image2.svg
│   │   │       ├── image3-1.png
│   │   │       ├── image3.png
│   │   │       ├── image4.png
│   │   │       ├── image5.svg
│   │   │       ├── image6.svg
│   │   │       ├── image7.svg
│   │   │       ├── image8.svg
│   │   │       └── image9.svg
│   │   ├── horaires
│   │   │   ├── index.html
│   │   │   └── media
│   │   │       ├── image1.svg
│   │   │       ├── image2.svg
│   │   │       ├── image3.svg
│   │   │       ├── image4.svg
│   │   │       ├── image5.svg
│   │   │       └── image6.svg
│   │   ├── index.xml
│   │   └── reseaux
│   │       ├── index.html
│   │       └── media
│   │           ├── image1.svg
│   │           ├── image2.svg
│   │           ├── image3.svg
│   │           ├── image4.svg
│   │           ├── image5.svg
│   │           ├── image6.svg
│   │           └── image7.svg
│   ├── originaux
│   │   ├── NF_Profil NeTEx pour l'accessibilité(F) - v2.2.doc
│   │   ├── NF_Profil NeTEx pour les Horaires(F) - v2.2.doc
│   │   ├── NF_Profil NeTEx pour les Réseaux(F) - v2.2.doc
│   │   ├── NF_Profil NeTEx pour les arrêts(F) - v2.2.doc
│   │   └── NF_Profil NeTEx éléments communs(F) - v2.3-Pub(1).doc
│   └── siri
│       ├── index.xml
│       └── profil-france
│           ├── index.html
│           └── media
│               ├── image1.png
│               ├── image2.png
│               ├── image3.png
│               └── image4.png
├── robots.txt
├── search
│   └── index.html
├── series
│   └── index.xml
├── sitemap.xml
└── tags
    ├── index.xml
    ├── netex
    │   └── index.xml
    └── siri
        └── index.xml

Je vais essayer d'installer une version plus ancienne et de voir si ça règle le souci.

@thbar thbar changed the title Souci de rendu en local Souci de rendu en local (lié à la version plus récente de Hugo ?) May 10, 2023
@thbar
Copy link
Contributor Author

thbar commented May 10, 2023

Il manquait une initialisation du submodule, mais j'ai quand même des erreurs après:

❯ hugo --minify
Start building sites … 
hugo v0.111.3+extended darwin/arm64 BuildDate=unknown
ERROR 2023/05/10 16:37:39 render of "taxonomy" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/terms.html:5:8: executing "_default/terms.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 16:37:39 render of "page" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/single.html:5:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 16:37:39 render of "page" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/single.html:5:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 16:37:39 render of "taxonomy" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/terms.html:5:8: executing "_default/terms.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
Error: Error building site: failed to render pages: render of "page" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/archives.html:5:8: executing "_default/archives.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
Total in 54 ms

@thbar
Copy link
Contributor Author

thbar commented May 10, 2023

J'ai compris: c'est lié à gohugoio/hugo#9172 et au template utilisé.

En version 0.100 ça fonctionne, en version 0.111.3 ça ne fonctionne plus.

Logs en version 0.100

https://github.com/gohugoio/hugo/releases/tag/v0.100.0

❯ ./hugo --minify
Start building sites … 
hugo v0.100.0-27b077544d8efeb85867cb4cfb941747d104f765+extended darwin/amd64 BuildDate=2022-05-31T08:37:12Z VendorInfo=gohugoio
WARN 2023/05/10 17:10:30 The google_news internal template will be removed in a future release. Please remove calls to this template. See https://github.com/gohugoio/hugo/issues/9172 for additional information.

                   | FR  
-------------------+-----
  Pages            | 22  
  Paginator pages  |  0  
  Non-page files   | 13  
  Static files     |  1  
  Processed images |  0  
  Aliases          |  4  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 241 ms

Logs en version 0.111.3

https://github.com/gohugoio/hugo/releases/tag/v0.111.3

Start building sites … 
hugo v0.111.3-5d4eb5154e1fed125ca8e9b5a0315c4180dab192+extended darwin/arm64 BuildDate=2023-03-12T11:40:50Z VendorInfo=gohugoio
ERROR 2023/05/10 17:11:59 render of "section" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/list.html:5:8: executing "_default/list.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 17:11:59 render of "taxonomy" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/terms.html:5:8: executing "_default/terms.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 17:11:59 render of "taxonomy" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/terms.html:5:8: executing "_default/terms.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
ERROR 2023/05/10 17:11:59 render of "page" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/single.html:5:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
Error: Error building site: failed to render pages: render of "page" failed: "/Users/thbar/git/transport/transport-normes-site/themes/PaperMod/layouts/_default/baseof.html:5:8": execute of template failed: template: _default/archives.html:5:8: executing "_default/archives.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:122:13: no such template "_internal/google_news.html"
Total in 55 ms

@thbar thbar changed the title Souci de rendu en local (lié à la version plus récente de Hugo ?) Incompatibilité avec Hugo v0.111.0+ May 10, 2023
@thbar
Copy link
Contributor Author

thbar commented Jul 31, 2023

Au mois de mai (je viens d'aller voir les logs), on était sur la version 0.85:

4:56:51 PM: Start building sites …
4:56:51 PM: hugo v0.85.0-724D5DB5+extended linux/amd64 BuildDate=2021-07-05T10:46:28Z VendorInfo=gohugoio
4:56:51 PM:                    | FR
4:56:51 PM: -------------------+------
4:56:51 PM:   Pages            |  41
4:56:51 PM:   Paginator pages  |   0
4:56:51 PM:   Non-page files   | 120
4:56:51 PM:   Static files     |   1
4:56:51 PM:   Processed images |   0
4:56:51 PM:   Aliases          |   9
4:56:51 PM:   Sitemaps         |   1
4:56:51 PM:   Cleaned          |   0
4:56:51 PM: Total in 303 ms

Je m'étonne de la différence affichée en nombre de pages, je ne sais pas si c'est pertinent ou pas mais je verrai.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant