Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It becomes more complicated as soon as a you have a sidebar with "Last articles" in which case you would need to edit each single HTML files to edit the sidebar consistently. Even with a single archives page you need to think about updating the archive for each new article. Also Markdown is definitely more author-friendly than HTML, but that's more like an extra.


If you're using Apache, which he said he was, you can just use server-side includes: https://httpd.apache.org/docs/current/mod/mod_include.html#e...


In the distant past, we used client side includes. They were known as framesets.


Another option is to use cat and a shell script or Makefile, or I guess some people use m4.


I use a makefile that runs a short python script, very simple


    cat header > index.html
    cat page >> index.html
    cat footer >> index.html


    cat header page footer > index.html
("cat" is short for "concatenate".) ;)


even better! (although you may want some steps in between)




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

Search: