templates/index.tmpl

{{/* templates/index.tmpl -- home page, a reverse-chronological list of all
     non-draft posts. The list is intentionally flat; tag pages live in
     templates/tag.tmpl. */}}
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>TIL</title>
  <meta name="viewport" content="width=device-width,initial-scale=1">
  <link rel="alternate" type="application/rss+xml" href="/feed.xml">
  <link rel="alternate" type="application/atom+xml" href="/atom.xml">
  <link rel="stylesheet" href="/style.css">
</head>
<body>
  <header>
    <h1><a href="/">TIL</a></h1>
    <p>Today-I-Learned notes. Built with tilstream.</p>
  </header>
  <main>
    <ul class="posts">
      {{ range .Posts }}
      <li>
        <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
        <a href="/{{ .Slug }}.html">{{ .Title }}</a>
        {{ if .Tags }}<span class="tags">
          {{ range .Tags }}<a href="/tags/{{ . }}.html">#{{ . }}</a>{{ end }}
        </span>{{ end }}
      </li>
      {{ end }}
    </ul>
  </main>
  <footer>
    <a href="/feed.xml">RSS</a> ยท
    <a href="/atom.xml">Atom</a>
  </footer>
</body>
</html>