2 次代码提交

作者 SHA1 备注 提交日期
  Adrian Short d0a9256d89 Add bookmarks template 2 年前
  Adrian Short ae67938af5 Add .gitignore 2 年前
共有 2 个文件被更改,包括 34 次插入0 次删除
  1. +1
    -0
      .gitignore
  2. +33
    -0
      layouts/_default/bookmarks.html

+ 1
- 0
.gitignore 查看文件

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

+ 33
- 0
layouts/_default/bookmarks.html 查看文件

@@ -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 }}

正在加载...
取消
保存