Trying to publish via GitHub pages

Hello, I’m trying to publish my personal Hugo site via Github Pages. I followed this guide:

But I’m stuck at the point where Github tries to build it and it fails:

Error: fatal: No url found for submodule path ‘themes/hugo-profile’ in .gitmodules

The actual pipeline:

Am I supposed to create a .gitmodules file? Because I don’t see I have it

Thanks!

looks like you were adding a theme using submodules.

Usually i do that on the command line with something like this:

  1. git submodule init
  2. git submodule add <URL-to-submodule-repository> <path-to-submodule-directory>
  3. git add <path-to-submodule-directory>

I’m not 100% on how to fix it on your end, but I would start by trying to edit or delete the entry in .gitmodules and trying to start over.

When I do locally

git submodule init

I get

fatal: No url found for submodule path ‘themes/hugo-profile’ in .gitmodules

But I got no .gitmodules file, am I supposed to create it manually?

When you run git submodule status it should return something like this

47925ef8c77ddcb6591f7915f73cc2e91a1db1a6 themes/soft-ui (remotes/origin/HEAD)

For each that doesn’t exist, try git submodule deinit path-to-submodule.
Add the theme you want with git submodule add ____and in then git submodule update --init --recursive

Another option, is to forget git altogether and use hugo modules. I’m just not sure if those will work with github pages. They should.

Ok I did git clear cache, created a new .gitmodules file and added this:

[submodule “themes/hugo-profile”]
path = themes/hugo-profile
url = GitHub - gurusabarish/hugo-profile: A highly customizable and mobile first Hugo template for personal portfolio and blog.

I seem to pass that problematic issue but now I face a new one in “Build with Hugo” phase:

Error: error building site: render: failed to render pages: render of “page” failed: “/home/runner/work/personal-site/personal-site/layouts/_default/baseof.html:5:6”: execute of template failed: template: _default/gallery.html:5:6: executing “_default/gallery.html” at <partial “head.html” .>: error calling partial: execute of template failed: template: _internal/opengraph.html:6:15: executing “_internal/opengraph.html” at <partial “_funcs/get-page-images” .>: error calling partial: execute of template failed: template: partials/_funcs/get-page-images.html:24:18: executing “partials/_funcs/get-page-images.html” at <urls.Parse>: error calling Parse: error in Parse: unable to cast map[string]interface {}{“src”:“https://iso.500px.com/wp-content/uploads/2016/03/stock-photo-142984111-1500x1000.jpg”} of type map[string]interface {} to string

I tried following that but I don’t have anywhere in my project the use of this image.

This is the actual pipeline:

If it matters, when I do git submodule status
I get
92ffcdb0880ac211ab972d1eab336ff0f6106d9b themes/hugo-profile (v4.05-6-g92ffcdb)

try git submodule update if there are no files in the path of your theme