Migrate hugo theme

I want to migrating my existing website from hugo-coder theme to papermod theme
how can I get started and achieve this migration

It depends on a few factors such as–

  1. How did you install the theme (cloning/copy-pasting or as a submodule)?
  2. To what extent have you customised the theme?
  3. Will your site be affected if you switch the themes? See point 2.

What you will need to do–

  1. Backup your theme first before you change it.
  2. Install the new theme.
  3. Read the new theme’s documentation on how to configure it.
  4. Customize the theme if you need to.
  5. Test thoroughly to confirm nothing is broken/missing
  6. Deploy your site

N.B. If you copied the current theme’s files to your project’s root directory to customize the theme, backup and delete them before installing the new theme.

I am getting this error in building the site with new theme papermod on a new branch

Run hugo --minify

WARN 2023/09/19 08:26:33 Module “PaperMod” is not compatible with this Hugo version; run “hugo mod graph” for more information.

Start building sites …

hugo v0.92.0-B3549403+extended linux/amd64 BuildDate=2022-01-12T08:23:18Z VendorInfo=gohugoio

Error: Error building site: failed to render pages: render of “page” failed: execute of template failed: template: _default/single.html:25:6: executing “main” at <partial “cover.html” (dict “cxt” . “IsHome” false “isHidden” $isHidden)>: error calling partial: “/home/runner/work/alen-abraham.github.io/alen-abraham.github.io/themes/PaperMod/layouts/partials/cover.html:8:34”: execute of template failed: template: partials/cover.html:8:34: executing “partials/cover.html” at : can’t evaluate field ByType in type interface {}

ERROR 2023/09/19 08:26:34 render of “page” failed: execute of template failed: template: _default/single.html:25:6: executing “main” at <partial “cover.html” (dict “cxt” . “IsHome” false “isHidden” $isHidden)>: error calling partial: “/home/runner/work/alen-abraham.github.io/alen-abraham.github.io/themes/PaperMod/layouts/partials/cover.html:8:34”: execute of template failed: template: partials/cover.html:8:34: executing “partials/cover.html” at : can’t evaluate field ByType in type interface {}

ERROR 2023/09/19 08:26:34 render of “page” failed: execute of template failed: template: _default/single.html:25:6: executing “main” at <partial “cover.html” (dict “cxt” . “IsHome” false “isHidden” $isHidden)>: error calling partial: “/home/runner/work/alen-abraham.github.io/alen-abraham.github.io/themes/PaperMod/layouts/partials/cover.html:8:34”: execute of template failed: template: partials/cover.html:8:34: executing “partials/cover.html” at : can’t evaluate field ByType in type interface {}

ERROR 2023/09/19 08:26:34 render of “page” failed: execute of template failed: template: _default/single.html:25:6: executing “main” at <partial “cover.html” (dict “cxt” . “IsHome” false “isHidden” $isHidden)>: error calling partial: “/home/runner/work/alen-abraham.github.io/alen-abraham.github.io/themes/PaperMod/layouts/partials/cover.html:8:34”: execute of template failed: template: partials/cover.html:8:34: executing “partials/cover.html” at : can’t evaluate field ByType in type interface {}

ERROR 2023/09/19 08:26:34 render of “page” failed: execute of template failed: template: _default/single.html:25:6: executing “main” at <partial “cover.html” (dict “cxt” . “IsHome” false “isHidden” $isHidden)>: error calling partial: “/home/runner/work/alen-abraham.github.io/alen-abraham.github.io/themes/PaperMod/layouts/partials/cover.html:8:34”: execute of template failed: template: partials/cover.html:8:34: executing “partials/cover.html” at : can’t evaluate field ByType in type interface {}

Total in 105 ms

Error: Process completed with exit code 255.

This message inidcates that the version of your hugo binary (v0.92.0) is below the minimum version required by the theme. Therefore I would propose to upgrade your hugo instance and try again. Maybe this solves your problem already.

thanks for the reply
my issue got solved
I removed the specified version tag from my build workflow
and did the build with “latest” version