layout: display basic taxonomies information
* NEW Adds a list template. * NEW Displays the categories and tags of a blog post. Co-Authored-by: Igor Milhit <igor@milhit.ch>pull/31/head
parent
498a724195
commit
4477b3033e
|
@ -0,0 +1,19 @@
|
|||
{{ define "main" }}
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{.Title}}</h1>
|
||||
</header>
|
||||
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
|
||||
{{.Content}}
|
||||
</article>
|
||||
<ul>
|
||||
<!-- Ranges through content/posts/*.md -->
|
||||
{{ range .Pages }}
|
||||
<li>
|
||||
<a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</main>
|
||||
{{ end }}
|
|
@ -2,43 +2,29 @@
|
|||
<section id="main">
|
||||
<header>
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
<h4 id="date">{{ .Date.Format "2006-01-02" }}</h4>
|
||||
<ul class="post-info">
|
||||
<li>Publié le : {{ .Date.Format "2006-01-02" }}</li>
|
||||
{{ with .Params.categories }}
|
||||
<li>Catégories :</li>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li><a href="{{ "categories" | absURL}}/{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ with .Params.tags }}
|
||||
<li>Tags :</li>
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li> <a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</header>
|
||||
<article id="content">
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
|
||||
{{/*
|
||||
<aside id="meta">
|
||||
<div>
|
||||
<section>
|
||||
</section>
|
||||
{{ with .Params.topics }}
|
||||
<ul id="topics">
|
||||
{{ range . }}
|
||||
<li><a href="{{ "topics" | absURL}}{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ with .Params.tags }}
|
||||
<ul id="tags">
|
||||
{{ range . }}
|
||||
<li> <a href="{{ "tags" | absURL }}{{ . | urlize }}">{{ . }}</a> </li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div>
|
||||
{{ with .PrevInSection }}
|
||||
<a class="previous" href="{{.Permalink}}"> {{.Title}}</a>
|
||||
{{ end }}
|
||||
{{ with .NextInSection }}
|
||||
<a class="next" href="{{.Permalink}}"> {{.Title}}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
*/}}
|
||||
{{ end }}
|
||||
|
||||
|
|
Loading…
Reference in New Issue