e11sync

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

single.html (1108B) - Raw


      1 {{ define "main" -}}
      2 <article>
      3   <div class="title">
      4     <h1>{{ .Title }}</h1>
      5     {{ with .Params.Subtitle -}}
      6     <h2>{{ . }}</h2>
      7     {{ end -}}
      8   </div>
      9   {{ if .Date -}}
     10   <div class="meta">{{ .Date.Format (.Site.Params.dateFormat | default "2006-01-02 15:04") }}</div>
     11   {{ end -}}
     12   {{ $taxo := "tags" -}}
     13   {{ if .Param $taxo -}}
     14   <div class="meta">
     15     {{ $data := newScratch }}
     16     {{ range .Param $taxo -}}
     17     {{ $name := . -}}
     18     {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | anchorize)) }}
     19     {{ $data.Set "url" .Permalink }}
     20     {{ end }}
     21     {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
     22     {{ $data.Set "url" .Permalink }}
     23     {{ end }}
     24     <div class="tag"><a href="{{ $data.Get "url" }}">#{{ $name }}</a></div>
     25     {{ end -}}
     26   </div>
     27   {{ end -}}
     28   <div class="artical-body">
     29   {{ if ne .TableOfContents "<nav id=\"TableOfContents\"></nav>" }}
     30     {{ .TableOfContents }}
     31     <div class="content-with-toc">
     32       {{ .Content -}}
     33     </div>
     34   {{ else }}
     35     <div class="content">
     36       {{ .Content -}}
     37     </div>
     38   {{ end }}
     39   </div>
     40 </article>
     41 {{ end -}}