←back to thread

622 points ColinWright | 1 comments | | HN request time: 0.215s | source
Show context
squarefoot ◴[] No.30082865[source]
Slightly related: I may want to contribute to the cause by building a very small personal site on a broadband connection (unfiltered public dynamic IP plus DuckDns) after I solve some health problems and relocate, hopefully within a few months. If I'm lucky I should get a better connection than the roughly 60down/22up I have now, which would seem ridiculous for that use, but I'd make a strictly static site, no Javascript, small images and no or extremely small downloads (torrent might help for bigger ones, if any). I don't plan to build any community around it, just to document projects I would discuss on newsgroups and possibly here, so no user input would be involved. Anyone here who had a similar experience can share more information, caveats, suggest tools, etc? Thanks.
replies(2): >>30086576 #>>30090651 #
1. mrlemke ◴[] No.30086576[source]
Apache with server side includes (SSI) will allow you to quickly and easily template websites without adding new tools or processes. I find this to be a decent balance between a static site and DRY. I don't care for most static site generators since I prefer to write my site content in HTML as much as possible.

For example, your index.html may look like:

  <!-- #include virtual="/top.html" -->
  <h1>My Website</h1>
  <p>A bunch of content</p>
  <!-- #include virtual="/bottom.html" -->
top.html could be something like:

  <html>
    <head>
      <title>My Website</title>
      <!--other header info -->
    </head>
    <body>
And for bottom.html:

      <footer>
        <!-- footer stuff -->
      </footer>
    </body>
  </html>