Hugo metadata utility

I got fed up with editing tags and categories for all my pages, so I built a utility to do mass addition/removal of metadata from the command line.

As an added bonus, you can connect it to IBM Cloud and have Watson attempt to extract keywords and categories from your posts, and then interactively select which ones you want to add to each file.


When running go get -u I’m getting

package hugoutil/watson: unrecognized import path "hugoutil/watson" (import path does not begin with hostname)

Deleted the entire / directory from my Go PATH so that everything gets pulled again, but I keep getting the same error.

The project uses modules, I’ve no idea if it builds in a legacy GOPATH environment. There were some go.mod problems which for some reason didn’t turn up on my local environment; I’ve fixed them and verified that the package builds from scratch on a different machine.

However, you need to git clone and build, because go get -u doesn’t seem to know how to fetch blackfriday properly.

Right. I followed the installation instructions as currently written in the repo and that didn’t work.

What worked for me was to clone the repo outside the GOPATH (i.e. my desktop) and then from the root of the cloned repo I ran go get -u then eveything worked.

Perhaps the instructions need to be made more explicit. Since Go modules are fairly new. The installation command looks the same as it used to be, but now one needs to execute it in a directory that contains the module file i.e. go.mod

Just my two cents to save frustration. Other than that thank you so much for this tool. It’s brilliant . :tada:

I see that the installation instructions were updated. :+1:

Naturally I had to test hugoutil vs a project with various Page Bundles. This little tool assigned tags in the blink of an eye in the of every leaf bundle contained under /content/ with:
hugoutil --tag 'ink,drawing' content/*/*.md

This so useful. I wish that it could be incorporated into Hugo source.

So I opened a GitHub issue for this functionality: