Getting a fatal error when I try deploying to Cloudflare. I created the Hugo site locally on VSCode using Hugo Theme ‘Blist’, and when I try to deploy from GitHub Repo the error says:
fatal: No url found for submodule path ‘themes/blist’ in .gitmodules
But I have created the .gitmodules file and included the path to the URL. I have looked everywhere and I don’t know what is wrong.
I am using hugo version v0.105.0+extended darwin/amd64
I am using Node.js version 18.12.1
Under the themes directory, what directory is the theme in?
And how did you add the theme to your project? Typically the process would be:
hugo new site foo
cd foo
git init
git submodule add https://github.com/apvarun/blist-hugo-theme.git themes/blist
echo "theme = 'blist'" >> config.toml
cp themes/blist/package* .
npm ci
hugo server
hmm. I did not do that. followed a tutorial on youtube. i did:
hugo new site foo f- yml
cd foo
git clone https://https://github.com/apvarun/blist-hugo-theme.
theme also called for the steps I added to the screen shot. I dragged the package-lock.json file out and dropped it in the root but i forgt to move the package.json I just realized when talking to you. I am going to check now to see if this is the problem
Got it. Thank you. so, just to be clear, my best course right now would be to delete the project and start from the beginning? And for future reference the best practice when creating a hugo site is to use the git submodule command?
I am. But I learned a lot this time around so i think I could redo the whole project much faster and gain some good experience practicing it one more time.
Thanks for your help. I have been trying to figure this out for two days now. Should have read the Hugo docs instead of deferring to YouTube. Lesson learned. Thanks again.
If I may ask one more question, I am following your instructions above and its working out so far, but I am not having any luck with this command:
[cp themes/foo/package* . ]
I am using a different theme but I thought it should probably be the same process. I keep getting the message no matches found or no such file or directory. Is this command necessary?
Never mind. Now I am getting an error message with the npm ci command. I am having no luck here. This seems like maybe a different issue than the one I opened so I should move it to a new issue
I have to start over because I entered the echo "theme = ‘scroll’ instead of ‘hugo-scroll’ but I think it will work this time. That was my carelessness.