Building a Blog from Markdown
Why a Markdown blog?
I wanted a place to write without fighting a heavy CMS. The goal was simple: write in Markdown, and let a small build step turn each file into a static HTML page that lives right next to my portfolio.
How it works
- I write a post as a
.mdfile insidecontent/blog/. - A tiny Node script (
scripts/build.js) reads the file, parses its frontmatter and converts the body to HTML with marked. - The result is written to
blog/as a plain HTML page — no server, no database.
const html = marked.parse(content);
Bilingual by design
Each post can exist in two languages using the .<lang>.md suffix:
hello-world.en.mdhello-world.pt.md
The language switch in the header jumps between the two versions, and remembers your choice — just like the main portfolio.
The whole thing deploys as a static site, so hosting stays free.
That's it. Short, fast, and fully under my control.
