Revisiting an abandoned Hugo site (last v .4)

I’m starting to work on a hugo site that was started about 2 years ago and since abandoned. Since then, Hugo Pipes was added and better support for Netlify is included, and I would like to migrate to the modern stack.

Back then, I was using indigotree/atlas to publish to Netlify.

Questions:
Should I update to the latest atlas (if so, how? - I didn’t submodule the repo) or start fresh with a new Hugo install?

If I start fresh, what is the best way to migrate templates and content?

Experience level: HTML/CSS some JS. Low familiarity, and high annoyance with NPM, Github and build automation tools, but willing to learn.

Of course you should update :wink: The question is, how you integrated the theme. Did you copy it into layouts and worked on it (bad)? Or did you put it into the themes folder (better)? If you put it into the themes folder then I would go the following way:

backup a working version:

if you know what exact hugo version worked with your old site then download that binary, put it into the repo. then check with ./hugo version if you can run this local version on the old website. If so, lets make a backup that you can go to whenever you give up on the new one or you need to re-deploy the old site while working on the new one.

git add hugo && git commit "chore: adding hugo v0.4 to repo"
git checkout -B backup
git push origin --all
git checkout master

This commits the old hugo, creates a backup branch, then it pushes the branch to your github repo. Then it goes back to the version we are working with.

starting out with the new version:

get the current version of the atlas theme and put it into your themes folder. Then go back to the repository root (remove the old hugo version and install the current version globally via whatever way you prefer. Note, that you require hugo-extended for pipes.)

Then run hugo and from there you go.

When you run hugo it will print out error messages. Please put your repo public online and put the errors and the repo address into a new thread here on discourse and we will help you.

using the theme in the layouts folder

If you put your theme into the layouts folder it will be a longer way, because you block yourself basically from updates of the theme. I would do the above, put all in themes, keep the layouts folder and see, what looks weird and from there eliminate everything that you changed on the theme (if the theme is in themes and you delete the file in layouts then the theme file will be executed). You should in the long run have only changes to the original theme in your layouts folder.

1 Like

Thanks for the help. I didn’t use themes at all, but rather created custom layouts. For the upgraded version of my site, should I also convert my layouts into themes, or does it matter?

I wouldn’t say it matters. You could. But you don’t need to. Leave it in layouts for now and see where it goes.