Tool for migrating frontmatter content to sql

Hello!

I have a plan to extract the data from /content to a relational database, so I could use the same data somewhere else. I could do it manually, but there is already ALOT of content and was wondering if there are some tools to query the frontmatter of hugo.

Has anyone had experience with this? I could not find any threads or issues regarding this.

Thanks in advance!

If it were my project, I would try to script it, using some tool. There are a few things floating on github, like:

Probably it’s going to be about collecting up all the frontmatter into some big array or data table, then doing a bunch of INSERTs.

1 Like

Thinking outside the box, what if you just use the concept of making a search index json file, and add all the fields you need to it, just for this purpose.

So in the dict bit, just add all the fields you have. Once you have the json, it’s trivial to parse it into a csv using jq. Redirecting to jqlang.github.io

2 Likes

Thanks for all your feedback! These are good solutions I could work with;)

1 Like