Open thbar opened 1 year ago
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
J'ai compris: c'est lié à https://github.com/gohugoio/hugo/issues/9172 et au template utilisé.
En version 0.100 ça fonctionne, en version 0.111.3 ça ne fonctionne plus.
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
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
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.
A partir de la v0.111.0, le template "google_news" a été supprimé (https://github.com/gohugoio/hugo/commit/66f94b4945e804f10be0a04d1365bb3c6e1a4c05). 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 (https://github.com/adityatelange/hugo-PaperMod/compare/8021be2ddb5336bcc84682d4702ec43b7a579b81...bacb763071d9852bb719675e6c4452fc5650a193), 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:
En local, j'ai:
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.