2 Commits

Author SHA1 Message Date
  Adrian Short d0a9256d89 Add bookmarks template 1 year ago
  Adrian Short ae67938af5 Add .gitignore 1 year ago
2 changed files with 34 additions and 0 deletions
Split View
  1. +1
    -0
      .gitignore
  2. +33
    -0
      layouts/_default/bookmarks.html

+ 1
- 0
.gitignore View File

@@ -0,0 +1 @@
*.swp

+ 33
- 0
layouts/_default/bookmarks.html View File

@@ -0,0 +1,33 @@
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
<p class=byline>Collected by <a href=/>{{ .Site.Params.AuthorName }}</a>.</p>
{{ .Content }}

<h2>Categories</h2>
<ul>
{{- range sort .Site.Data.bookmarks "title" }}
<li><a href="#{{ urlize .title }}">{{ .title }}</a></li>
{{- end }}
</ul>

{{ range sort .Site.Data.bookmarks "title" }}
<section id="{{ urlize .title }}">
<h2>{{ .title }}</h2>
{{ if .notes -}}
<p>{{ .notes }}</p>
{{ end }}
{{- range sort .bookmarks "title" }}
<div>
<h3>
<a href="{{ .url }}">{{ .title }}</a>
</h3>
{{ if .notes -}}
<p>{{ .notes }}</p>
{{- end }}
</div>
{{- end }}
</section>
{{- end }}
</article>
{{ end }}

Loading…
Cancel
Save