{{ define "main" }} {{ $start_date := .Params.start_date }} {{ $end_date := .Params.end_date }} {{ $dispatches := slice }} {{ range (sort (.Site.RegularPages.RelatedTo (keyVals "tags" "dispatch")) "Date" "asc") }} {{ if lt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $start_date) }} {{ continue }} {{ end }} {{ if gt (time.Format "2006-01-02" .Date) (time.Format "2006-01-02" $end_date) }} {{ continue }} {{ end }} {{ $dispatches = $dispatches | append . }} {{ end }}
Dispatches, {{ time.Format "January 2006" $start_date }} – {{ time.Format "January 2006" $end_date }}
{{ .Content }}
{{ range $dispatches }}

{{ .Title }}

Posted {{ .Date | time.Format "2006-01-02" }}

{{ replaceRE `` "$3 ($1)" .Content | safeHTML }}
{{ end }} {{ $linkRE := `(?s)]+?href="(.+?)"[^>]*?>.*?` }}

References

{{ range $dispatches }}

{{ .Title }}

  1. {{ .RelPermalink }}
  2. {{ range findRE $linkRE .Content }} {{ if findRE ` {{ end }}
{{ end }} {{ end }}