Hacker News new | past | comments | ask | show | jobs | submit login

I was considering using bash, some command line markdown transformer, and a makefile to transform my blog posts from markdown into HTML by wrapping them in an HTML template that just have the strings $TITLE, $BODY, and $DATE substituted. I think that would be a fun way to do this with zero C code. One of the hard parts was figuring out how to avoid too many nested data structures, like embedded title in the markdown files via front matter. But I figured out that if all you have is a title and it's a one-line string, you can just use the `head` and `tail` command line utils to extract either the title string or the markdown body depending on which operation you're in the middle of, and you can still just use bash (except for the markdown converter). I plan to use this on my blog[1], and maybe also to generate a blog index.

[1] https://sephware.com/blog/




Links broken.

> But I figured out that if all you have is a title and it's a one-line string, you can just use the `head` and `tail` command line utils to extract either the title string or the markdown body depending on which operation you're in the middle of, and you can still just use bash

I took a similar approach with mine (http://flukus.github.io/building-a-blog-engine.html) but it get's messy pretty quickly. In a future iteration I'm planning on using M4 templates instead, M4 is actually pretty nice outside of autoconf.


You might want to check this out: https://github.com/alicemaz/website

Pretty nifty.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: