Skip to content
Serge Gatezh edited this page Apr 1, 2025 · 9 revisions

Migration to PaperMod

Installation

Followed the Download and Unzip method from Wiki due to the lack of knowledge how to do it in another (proper) way using Hugo modules

Fixing incompatibilities

There are multiple errors when running hugo server command:

hugo server
Watching for changes in /Users/sergii/Code/blog/{archetypes,assets,content,layouts,static,themes}
Watching for config changes in /Users/sergii/Code/blog/config.yaml
Start building sites … 
hugo v0.145.0+extended+withdeploy darwin/arm64 BuildDate=2025-02-26T15:41:25Z VendorInfo=brew

ERROR the "published" front matter field is not a parsable date: see /Users/sergii/Code/blog/content/posts/2017/03/31/how-to-host-angular-application-on-github-pages.markdown
ERROR the "published" front matter field is not a parsable date: see /Users/sergii/Code/blog/content/posts/2017/04/04/getting-started-with-jekyll.markdown
ERROR the "published" front matter field is not a parsable date: see /Users/sergii/Code/blog/content/posts/2017/04/04/host-your-personal-blog-on-github-pages.markdown
ERROR the "published" front matter field is not a parsable date: see /Users/sergii/Code/blog/content/posts/2017/07/16/using-anki-to-study-programming.markdown
ERROR render of "/404" failed: "/Users/sergii/Code/blog/layouts/_default/baseof.html:4:5": execute of template failed: template: 404.html:4:5: executing "404.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:3:14: no such template "_internal/google_analytics_async.html"
ERROR render of "/Users/sergii/Code/blog/content/posts/2017/04/04/host-your-personal-blog-on-github-pages.markdown" failed: "/Users/sergii/Code/blog/layouts/_default/baseof.html:4:5": execute of template failed: template: _default/single.html:4:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:3:14: no such template "_internal/google_analytics_async.html"
ERROR render of "/Users/sergii/Code/blog/content/posts/2017/04/04/getting-started-with-jekyll.markdown" failed: "/Users/sergii/Code/blog/layouts/_default/baseof.html:4:5": execute of template failed: template: _default/single.html:4:5: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:3:14: no such template "_internal/google_analytics_async.html"
ERROR render of "/Users/sergii/Code/blog/content/about.md" failed: "/Users/sergii/Code/blog/layouts/_default/baseof.html:4:5": execute of template failed: template: _default/about.html:4:5: executing "_default/about.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:3:14: no such template "_internal/google_analytics_async.html"
Built in 22 ms
Error: error building site: render: failed to render pages: render of "/" failed: "/Users/sergii/Code/blog/layouts/_default/baseof.html:4:5": execute of template failed: template: index.html:4:5: executing "index.html" at <partial "head.html" .>: error calling partial: execute of template failed: html/template:partials/head.html:3:14: no such template "_internal/google_analytics_async.html"

To fix that the following was done:

  • Remove published keys from front matter (where it was present)

  • Fix Google Analytics in head.html partial: replace _internal/google_analytics_async.html with _internal/google_analytics.html

  • In config.yaml replace

    author:
      name: Serge Gatezh

    with

    params:
      author:
        name: Serge Gatezh

    In Hugo v0.124.0 the .Site.Author method and the author key in the site configuration were deprecated

  • Replace in head.html: .Site.isServer to hugo.IsServer

    In Hugo version 0.120.0, the .Site.IsServer method was deprecated and replaced with the global function hugo.IsServer.

Clone this wiki locally