Hacker News new | ask | show | jobs
by spacesanjeet 590 days ago
I will try this out. I am on a hunt for a way to render markdown files into html code in a way that supports the existing structure of the webpage. For example, if I have a static webpage ready from scratch using HTML and CSS, would I be then able to post blogs using markdown to html in just a corner of the site?
2 comments

Next.js is an all-encompassing framework, so your existing static site would need to be placed in its `public` directory. Even then, the React-based frontend will take dominance.

For your use case I'd recommend a command-line tool that converts Markdown files from a given folder and outputs it to a corner of your existing site. There are implementations in various languages, so you can choose according to preference.

Given you have an existing website, it might be easier for you to add Markdown support to your site through a static site generator or server-side conversion step.

Or you can even use a Markdown-to-HTML tool (I believe pandoc has this feature) to convert the pages yourself before posting. That's a bit more manual but wouldn't require changing your current structure.

Anyway, if you end up using boilerplate, let me know what you think!