Best way to add existing markdown files to site?

I’ve got a bunch of Markdown files I want to drop into the Hugo content directory and then push to GitHub to render. What’s the recommended way to do this, especially with a batch approach? I’ve looked at hugo new content but I’m not sure how it deals with existing content.

Generic answer for a generic question:

just copy them to your content folder.

You might have to adjust/add frontmatterfollowing and add some index files or adjust folder structure.

Depending on the markdown dialect you currently use. You will have to adjust content aswell

For details please spend the time to read about

If you are using a theme, you will have to follow their structure. Check their docs.

Some handmade scripts may ease up depending on the amount…

There is no forced usage of hugo new content to create pages.

I can confirm what @irkode suggests:
check your existing Markdown files if they work with hugo.
if not, figure out what needs to be changed following which rule(s).
then write a script that processes one file, generating a target file which will be suitable for Hugo.
after that, write another script which loops all existing files, applying the conversion script on each one.
this is what I did 2 months ago when migrating my Grav Site to Hugo, roughly 250+ Markdown files.
this went well with some fixes by hand afterwards, but no big deal.
I can provide my conversion script (written in python) on demand as a template, if desired.

This article may be helpful.

1 Like

Thanks, I did copy them to content, but that wasn’t enough. They will need some kind of processing.