summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile67
-rw-r--r--content/9thPK7O3xn/dreams/index.md1
-rw-r--r--content/9thPK7O3xn/index.md10
-rw-r--r--content/9thPK7O3xn/misc/index.md3
-rw-r--r--content/9thPK7O3xn/posts/index.md4
-rw-r--r--scripts/metadata_filter.lua76
-rw-r--r--templates/base.html4
-rw-r--r--templates/feed.xml50
-rw-r--r--templates/feed_entry.xml30
-rw-r--r--templates/layouts/categorized_list.html46
10 files changed, 191 insertions, 100 deletions
diff --git a/Makefile b/Makefile
index aa4ecf3..b4a58e8 100644
--- a/Makefile
+++ b/Makefile
@@ -6,27 +6,31 @@ export DEPLOY_TARGET = vulpes@94.130.78.123:/srv/http/volpeon.ink/
6# FILE GROUPS 6# FILE GROUPS
7# 7#
8 8
9PANDOC_FILTERS := $(patsubst %,--lua-filter %,$(wildcard filters/*.lua)) 9PANDOC_FILTERS := $(patsubst %,--lua-filter %,$(wildcard filters/*.lua))
10GLOBAL_METADATA := $(patsubst %,--metadata-file %,$(wildcard metadata/*.yaml)) 10GLOBAL_METADATA := $(patsubst %,--metadata-file %,$(wildcard metadata/*.yaml))
11 11
12CONTENT_SRC := $(shell find content -type f -name "*.md") 12CONTENT_SRC := $(shell find content -type f -name "*.md")
13TEMPLATES_SRC := $(shell find templates -type f -name "*.html") 13FEED_SRC := $(shell grep -l "^create_feed: *true$$" $(CONTENT_SRC))
14CSS_SRC := $(shell find assets/css -type f -name "*.scss") 14CONTENT_TEMPLATES_SRC := $(shell find templates -type f -name "*.html")
15 15FEED_TEMPLATES_SRC := $(shell find templates -type f -name "*.xml")
16CONTENT_META := $(patsubst content/%.md,.cache/meta/%.json,$(CONTENT_SRC)) 16CSS_SRC := $(shell find assets/css -type f -name "*.scss")
17CONTENT_FILES := $(patsubst content/%.md,out/%.html,$(CONTENT_SRC)) 17
18FONT_FILES := $(patsubst assets/fonts/%.ttf,out/%.woff2,$(wildcard assets/fonts/*.ttf)) 18CONTENT_META := $(patsubst content/%.md,.cache/meta/%.json,$(CONTENT_SRC))
19CSS_FILES := $(patsubst assets/css/%.scss,out/%.css,$(wildcard assets/css/style.scss)) 19CONTENT_FILES := $(patsubst content/%.md,out/%.html,$(CONTENT_SRC))
20STATIC_FILES := $(patsubst content/%,out/%,$(shell find content -type f ! -name "*.md")) 20FEED_FILES := $(patsubst content/%.md,out/%.xml,$(FEED_SRC))
21FONT_FILES := $(patsubst assets/fonts/%.ttf,out/%.woff2,$(wildcard assets/fonts/*.ttf))
22CSS_FILES := $(patsubst assets/css/%.scss,out/%.css,$(wildcard assets/css/style.scss))
23STATIC_FILES := $(patsubst content/%,out/%,$(shell find content -type f ! -name "*.md"))
21 24
22# 25#
23# TARGETS 26# TARGETS
24# 27#
25 28
26all: content_meta content_files static_files font_files css_files 29all: content_meta content_files feed_files static_files font_files css_files
27 30
28content_meta: $(CONTENT_META) 31content_meta: $(CONTENT_META)
29content_files: $(CONTENT_FILES) 32content_files: $(CONTENT_FILES)
33feed_files: $(FEED_FILES)
30static_files: $(STATIC_FILES) 34static_files: $(STATIC_FILES)
31font_files: $(FONT_FILES) 35font_files: $(FONT_FILES)
32css_files: $(CSS_FILES) 36css_files: $(CSS_FILES)
@@ -43,14 +47,13 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \
43 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -maxdepth 1 -type f -name "*.md" ! -name "index.md") \ 47 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -maxdepth 1 -type f -name "*.md" ! -name "index.md") \
44 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -mindepth 2 -maxdepth 2 -type f -name "index.md")) 48 $(shell test -d $(patsubst .cache/meta%,content%,$(1)) && find $(patsubst .cache/meta%,content%,$(1)) -mindepth 2 -maxdepth 2 -type f -name "index.md"))
45 49
46.cache/meta/%.json: content/%.md $$(call subpages,$$(call namespace,$$@,)) scripts/subpages.jq | .cache/meta 50.cache/meta/%.json: content/%.md $$(call subpages,$$(call namespace,$$@,)) scripts/subpages.jq scripts/metadata_tpl.json | .cache/meta
47 $(info [META] $< -> $@) 51 $(info [META] $< -> $@)
48 52
49 mkdir -p $(@D) 53 mkdir -p $(@D)
50 $(eval PAGES_FILES = $(filter .cache/meta/%.json,$^)) 54 $(eval PAGES_FILES = $(filter .cache/meta/%.json,$^))
51 $(eval PAGES = $(shell mktemp))
52 $(eval NAMESPACE = $(call namespace,$@,.cache/meta)) 55 $(eval NAMESPACE = $(call namespace,$@,.cache/meta))
53 $(file >$(PAGES),$(if $(PAGES_FILES),$(shell jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES)),)) 56 $(if $(PAGES_FILES),jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES) > "$@.pages",touch "$@.pages")
54 pandoc \ 57 pandoc \
55 -f markdown-citations \ 58 -f markdown-citations \
56 -t plain \ 59 -t plain \
@@ -58,11 +61,18 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \
58 --template scripts/metadata_tpl.json \ 61 --template scripts/metadata_tpl.json \
59 --metadata namespace="$(NAMESPACE)" \ 62 --metadata namespace="$(NAMESPACE)" \
60 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \ 63 --metadata file_out="$(patsubst .cache/meta/%.json,out/%.html,$@)" \
61 --metadata-file "$(PAGES)" \ 64 --metadata-file "$@.pages" \
62 -o "$@" "$<" 65 -o "$@" "$<"
63 rm "$(PAGES)" 66# pandoc \
64 67 -f markdown-citations \
65out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua out/style.css | out 68 -t markdown \
69 -o "$@.content" "$<"
70# jq '. + { content: $$content }' --rawfile content "$@.content" "$@.meta" > "$@"
71 rm "$@.pages"
72# rm "$@.meta"
73# rm "$@.content"
74
75out/%.html: content/%.md .cache/meta/%.json $(CONTENT_TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua out/style.css | out
66 $(info [MARK] $< -> $@) 76 $(info [MARK] $< -> $@)
67 77
68 mkdir -p $(@D) 78 mkdir -p $(@D)
@@ -74,10 +84,27 @@ out/%.html: content/%.md .cache/meta/%.json $(TEMPLATES_SRC) metadata/*.yaml fil
74 --lua-filter scripts/metadata_filter.lua \ 84 --lua-filter scripts/metadata_filter.lua \
75 $(GLOBAL_METADATA) \ 85 $(GLOBAL_METADATA) \
76 --metadata-file "$(filter .cache/meta/%.json,$^)" \ 86 --metadata-file "$(filter .cache/meta/%.json,$^)" \
87 --metadata file_out="$@" \
77 --metadata style_hash="$(shell sha256sum out/style.css | cut -d ' ' -f 1)" \ 88 --metadata style_hash="$(shell sha256sum out/style.css | cut -d ' ' -f 1)" \
78 $(PANDOC_FILTERS) \ 89 $(PANDOC_FILTERS) \
79 -o "$@" "$<" 90 -o "$@" "$<"
80 91
92out/%.xml: content/%.md .cache/meta/%.json $(FEED_TEMPLATES_SRC) metadata/*.yaml filters/*.lua scripts/metadata_filter.lua | out
93 $(info [FEED] $< -> $@)
94
95 mkdir -p $(@D)
96 pandoc \
97 -f markdown-citations \
98 -t html5 \
99 --no-highlight \
100 --template templates/feed.xml \
101 --lua-filter scripts/metadata_filter.lua \
102 $(GLOBAL_METADATA) \
103 --metadata-file "$(filter .cache/meta/%.json,$^)" \
104 --metadata file_out="$@" \
105 $(PANDOC_FILTERS) \
106 -o "$@" "$<"
107
81out/%: content/% | out 108out/%: content/% | out
82 $(info [COPY] $< -> $@) 109 $(info [COPY] $< -> $@)
83 110
diff --git a/content/9thPK7O3xn/dreams/index.md b/content/9thPK7O3xn/dreams/index.md
index a204f42..fbe9a45 100644
--- a/content/9thPK7O3xn/dreams/index.md
+++ b/content/9thPK7O3xn/dreams/index.md
@@ -1,4 +1,5 @@
1--- 1---
2title: Dream Journal 2title: Dream Journal
3show_dates: true 3show_dates: true
4position: 9
4--- 5---
diff --git a/content/9thPK7O3xn/index.md b/content/9thPK7O3xn/index.md
index 2545092..ce07a22 100644
--- a/content/9thPK7O3xn/index.md
+++ b/content/9thPK7O3xn/index.md
@@ -1,7 +1,11 @@
1--- 1---
2title: Personal 2title: Personal
3layout: categorized_list 3layout: categorized_list
4create_feed: true
4--- 5---
5 6
6Welcome to the personal section of my website! 7Welcome to the personal section of my website!
7Here you can find content I don't want to be easily accessible for all visitors, which is why I haven't linked this section anywhere. 8The content in this section are things I don't feel belong in the public section of my website.
9Partly because it's test pages I use for development purposes, and partly because it's content that's too personal in nature.
10
11I don't forbid you to share content from here -- not that I could stop you anyway --, but please avoid sharing it with larger audiences.
diff --git a/content/9thPK7O3xn/misc/index.md b/content/9thPK7O3xn/misc/index.md
index 24cd717..0fc9e44 100644
--- a/content/9thPK7O3xn/misc/index.md
+++ b/content/9thPK7O3xn/misc/index.md
@@ -1,3 +1,4 @@
1--- 1---
2title: Other stuff 2title: Other stuff
3position: 10
3--- 4---
diff --git a/content/9thPK7O3xn/posts/index.md b/content/9thPK7O3xn/posts/index.md
new file mode 100644
index 0000000..592e730
--- /dev/null
+++ b/content/9thPK7O3xn/posts/index.md
@@ -0,0 +1,4 @@
1---
2title: Posts
3position: 0
4---
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index 000fda6..ebbd6d4 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -5,7 +5,7 @@ function format_date(date)
5 local year, month, day = date:match("(%d%d%d%d)-(%d%d)-(%d%d)") 5 local year, month, day = date:match("(%d%d%d%d)-(%d%d)-(%d%d)")
6 if not year then return nil end 6 if not year then return nil end
7 7
8 local time = os.time({year = tonumber(year), month = tonumber(month), day = tonumber(day)}) 8 local time = os.time({ year = tonumber(year), month = tonumber(month), day = tonumber(day) })
9 return { 9 return {
10 yyyy_mm_dd = os.date("%F", time), 10 yyyy_mm_dd = os.date("%F", time),
11 yyyy = os.date("%Y", time), 11 yyyy = os.date("%Y", time),
@@ -21,7 +21,7 @@ function table_to_list(t, kv, cmp)
21 local l = pandoc.List() 21 local l = pandoc.List()
22 22
23 if kv then 23 if kv then
24 for key, value in pairs(t) do l:insert({key = key, value = value}) end 24 for key, value in pairs(t) do l:insert({ key = key, value = value }) end
25 else 25 else
26 for _, value in pairs(t) do l:insert(value) end 26 for _, value in pairs(t) do l:insert(value) end
27 end 27 end
@@ -34,7 +34,7 @@ end
34function group_by(l, field, insert) 34function group_by(l, field, insert)
35 insert = insert or function(group, _, item) 35 insert = insert or function(group, _, item)
36 if not group then 36 if not group then
37 group = l:new({item}) 37 group = l:new({ item })
38 return group 38 return group
39 end 39 end
40 group:insert(item) 40 group:insert(item)
@@ -101,13 +101,13 @@ function resolve_url(site_url, ref_file, target_file)
101 local abs = target_file 101 local abs = target_file
102 local rel = relative_to(ref_base_dir, abs):gsub("/index%.html$", "/") 102 local rel = relative_to(ref_base_dir, abs):gsub("/index%.html$", "/")
103 103
104 return {abs = abs, rel = rel, full = (site_url .. abs)} 104 return { abs = abs, rel = rel, full = (site_url .. abs) }
105end 105end
106 106
107function resolve_layout(layout) 107function resolve_layout(layout)
108 if layout then 108 if layout then
109 layout = pandoc.utils.stringify(layout) 109 layout = pandoc.utils.stringify(layout)
110 return {id = layout, ["is_" .. layout] = true} 110 return { id = layout, ["is_" .. layout] = true }
111 end 111 end
112end 112end
113 113
@@ -117,7 +117,7 @@ function resolve_namespace(namespace)
117 local root = "index" 117 local root = "index"
118 if namespace ~= "" then root = namespace:gsub("^/([^/]*).*$", "%1") end 118 if namespace ~= "" then root = namespace:gsub("^/([^/]*).*$", "%1") end
119 119
120 return {root = {id = root, ["is_" .. root] = true}, full = namespace} 120 return { root = { id = root, ["is_" .. root] = true }, full = namespace }
121end 121end
122 122
123function prep_menu(active_id, main_menu) 123function prep_menu(active_id, main_menu)
@@ -137,17 +137,22 @@ function prep_menu(active_id, main_menu)
137end 137end
138 138
139function process_pages(global, pages_by_id) 139function process_pages(global, pages_by_id)
140 if not pages_by_id then pages_by_id = {} end 140 if not pages_by_id then return nil end
141 141
142 local pages_list = pandoc.List() 142 local pages_list = pandoc.List()
143 143
144 for _, page in pairs(pages_by_id) do 144 for _, page in pairs(pages_by_id) do pages_list:insert(process(global, page)) end
145 page = process(global, page)
146 pages_list:insert(page)
147 end
148 145
149 pages_list:sort(function(p1, p2) 146 pages_list:sort(function(p1, p2)
150 if p1.date then 147 if p1.position then
148 if p2.position then
149 return p1.position < p2.position
150 else
151 return true
152 end
153 elseif p2.position then
154 return false
155 elseif p1.date then
151 if p2.date then 156 if p2.date then
152 return p1.date.yyyy_mm_dd > p2.date.yyyy_mm_dd 157 return p1.date.yyyy_mm_dd > p2.date.yyyy_mm_dd
153 else 158 else
@@ -166,7 +171,7 @@ function process_pages(global, pages_by_id)
166 if not data then 171 if not data then
167 local l = pandoc.List() 172 local l = pandoc.List()
168 l:insert(p) 173 l:insert(p)
169 return {name = pandoc.utils.stringify(p.category.name), pages = l} 174 return { name = pandoc.utils.stringify(p.category.name), pages = l }
170 else 175 else
171 data.pages:insert(p) 176 data.pages:insert(p)
172 end 177 end
@@ -174,11 +179,24 @@ function process_pages(global, pages_by_id)
174 pages_by_category = table_to_list(pages_by_category, false, 179 pages_by_category = table_to_list(pages_by_category, false,
175 function(i1, i2) return i1.name < i2.name end) 180 function(i1, i2) return i1.name < i2.name end)
176 181
177 local pages_data = {all = pages_list, by_id = pages_by_id, by_category = pages_by_category} 182 local pages_data = { all = pages_list, by_id = pages_by_id, by_category = pages_by_category }
178 183
179 return pages_data 184 return pages_data
180end 185end
181 186
187function pages_last_update(all_pages)
188 local last_update = format_date("1990-01-01")
189
190 for i = 1, #all_pages do
191 local page = all_pages[i]
192 if page.last_update and page.last_update.yyyy_mm_dd > last_update.yyyy_mm_dd then
193 last_update = page.last_update
194 end
195 end
196
197 return last_update
198end
199
182function process(global, meta) 200function process(global, meta)
183 meta.namespace = resolve_namespace(meta.namespace) 201 meta.namespace = resolve_namespace(meta.namespace)
184 meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "") 202 meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "")
@@ -186,6 +204,22 @@ function process(global, meta)
186 meta.url = resolve_url(global.site.url, global.file_out, meta.file_out) 204 meta.url = resolve_url(global.site.url, global.file_out, meta.file_out)
187 meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or "" 205 meta.title = (meta.title and pandoc.utils.stringify(meta.title)) or ""
188 206
207 if meta.position then meta.position = pandoc.utils.stringify(meta.position) end
208
209 if meta.create_feed then
210 if meta.file_out:match(".html$") then
211 meta.feed = {
212 url = resolve_url(global.site.url, global.file_out,
213 meta.file_out:gsub(".html$", ".xml")),
214 }
215 else
216 meta.page = {
217 url = resolve_url(global.site.url, global.file_out,
218 meta.file_out:gsub(".xml$", ".html")),
219 }
220 end
221 end
222
189 if meta.preview then 223 if meta.preview then
190 meta.preview = make_absolute(pandoc.utils.stringify(meta.preview), meta.file_out) 224 meta.preview = make_absolute(pandoc.utils.stringify(meta.preview), meta.file_out)
191 meta.preview = resolve_url(global.site.url, global.file_out, meta.preview) 225 meta.preview = resolve_url(global.site.url, global.file_out, meta.preview)
@@ -193,18 +227,20 @@ function process(global, meta)
193 227
194 if meta.date then meta.date = format_date(meta.date) end 228 if meta.date then meta.date = format_date(meta.date) end
195 229
196 if meta.last_update then
197 meta.last_update = format_date(meta.last_update)
198 else
199 meta.last_update = meta.date
200 end
201
202 if meta.menus and meta.menus.main then 230 if meta.menus and meta.menus.main then
203 meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main) 231 meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main)
204 end 232 end
205 233
206 meta.pages = process_pages(global, meta.pages) 234 meta.pages = process_pages(global, meta.pages)
207 235
236 if meta.last_update then
237 meta.last_update = format_date(meta.last_update)
238 elseif meta.date then
239 meta.last_update = meta.date
240 elseif meta.pages then
241 meta.last_update = pages_last_update(meta.pages.all)
242 end
243
208 return meta 244 return meta
209end 245end
210 246
diff --git a/templates/base.html b/templates/base.html
index 5dc57e2..6c0c4a9 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -19,6 +19,10 @@
19 <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" /> 19 <meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
20 $endif$ 20 $endif$
21 21
22 $if(feed)$
23 <link href="$feed.url.rel$" type="application/atom+xml" rel="alternate" title="$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$" />
24 $endif$
25
22 <title>$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$</title> 26 <title>$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$</title>
23 27
24 <link rel="preload" href="/style.css?$style_hash$" as="style" /> 28 <link rel="preload" href="/style.css?$style_hash$" as="style" />
diff --git a/templates/feed.xml b/templates/feed.xml
index a968205..ad665d2 100644
--- a/templates/feed.xml
+++ b/templates/feed.xml
@@ -1,10 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?> 1<?xml version="1.0" encoding="utf-8"?>
2<feed xmlns="http://www.w3.org/2005/Atom"> 2<feed xmlns="http://www.w3.org/2005/Atom">
3 <title>$if(section.is_index)$$else$$title$ – $endif$$site.title$</title> 3 <title>$if(namespace.root.is_index)$$else$$title$ – $endif$$site.title$</title>
4 <link href="$url.full$" rel="self"/> 4 <link href="$url.abs$" rel="self"/>
5 <link href="$page.url.full$"/> 5 <link href="$page.url.abs$"/>
6 <updated>$pages.last_update.rfc3339$</updated> 6 <updated>$last_update.rfc3339$</updated>
7 <id>$url.full$</id> 7 <id>$url.abs$</id>
8 $for(author)$ 8 $for(author)$
9 <author> 9 <author>
10 <name>$it.name$</name> 10 <name>$it.name$</name>
@@ -14,33 +14,15 @@
14 </author> 14 </author>
15 $endfor$ 15 $endfor$
16 16
17 $for(pages.all_dated)$ 17 $if(layout.is_categorized_list)$
18 <entry> 18 $for(pages.all)$
19 <id>$it.url.full$</id> 19 $for(it.pages.all)$
20 <title type="html"><![CDATA[$it.title$]]></title> 20 $it:feed_entry()$
21 $if(it.author)$ 21 $endfor$
22 $for(it.author)$ 22 $endfor$
23 <author> 23 $else$
24 <name>$it.name$</name> 24 $for(pages.all)$
25 $if(it.email)$ 25 $it:feed_entry()$
26 <email>$it.email$</email> 26 $endfor$
27 $endif$ 27 $endif$
28 </author>
29 $endfor$
30 $else$
31 $for(author)$
32 <author>
33 <name>$author.name$</name>
34 $if(author.email)$
35 <email>$author.email$</email>
36 $endif$
37 </author>
38 $endfor$
39 $endif$
40 <link href="$it.url.full$"/>
41 <published>$it.date.rfc3339$</published>
42 <updated>$it.last_update.rfc3339$</updated>
43 <content type="html"><![CDATA[$it.content$]]></content>
44 </entry>
45 $endfor$
46</feed> 28</feed>
diff --git a/templates/feed_entry.xml b/templates/feed_entry.xml
new file mode 100644
index 0000000..f4c5d47
--- /dev/null
+++ b/templates/feed_entry.xml
@@ -0,0 +1,30 @@
1<entry>
2 <id>$it.url.abs$</id>
3 <title>$it.title$</title>
4 <link rel="alternate" href="$it.url.abs$"/>
5 $if(it.author)$
6 $for(it.author)$
7 <author>
8 <name>$it.name$</name>
9 $if(it.email)$
10 <email>$it.email$</email>
11 $endif$
12 </author>
13 $endfor$
14 $else$
15 $for(author)$
16 <author>
17 <name>$author.name$</name>
18 $if(author.email)$
19 <email>$author.email$</email>
20 $endif$
21 </author>
22 $endfor$
23 $endif$
24 $if(it.date)$
25 <published>$it.date.rfc3339$</published>
26 $endif$
27 $if(it.last_update)$
28 <updated>$it.last_update.rfc3339$</updated>
29 $endif$
30</entry>
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html
index 8f39229..6e72194 100644
--- a/templates/layouts/categorized_list.html
+++ b/templates/layouts/categorized_list.html
@@ -8,28 +8,30 @@ $body$
8 8
9 <div class="c-post-list"> 9 <div class="c-post-list">
10 $for(pages.all)$ 10 $for(pages.all)$
11 <h2 class="c-post-list__category-header"> 11 $if(it.pages)$
12 $it.title$ 12 <h2 class="c-post-list__category-header">
13 </h2> 13 $it.title$
14 <div class="c-post-list__category-content"> 14 </h2>
15 $for(it.pages.all)$ 15 <div class="c-post-list__category-content">
16 <a href="$it.url.rel$" class="c-post-list__post c-card"> 16 $for(it.pages.all)$
17 <div class="c-card__content"> 17 <a href="$it.url.rel$" class="c-post-list__post c-card">
18 $it.title$ 18 <div class="c-card__content">
19 </div> 19 $it.title$
20 $if(pages.all.show_dates)$ 20 </div>
21 <time datetime="$it.date.yyyy_mm_dd$" class="c-card__content u-fs0"> 21 $if(pages.all.show_dates)$
22 <small class="u-dn@sm-hi"> 22 <time datetime="$it.date.yyyy_mm_dd$" class="c-card__content u-fs0">
23 $it.date.short$ 23 <small class="u-dn@sm-hi">
24 </small> 24 $it.date.short$
25 <small class="u-dn@sm-lo"> 25 </small>
26 $it.date.long$ 26 <small class="u-dn@sm-lo">
27 </small> 27 $it.date.long$
28 </time> 28 </small>
29 $endif$ 29 </time>
30 </a> 30 $endif$
31 $endfor$ 31 </a>
32 </div> 32 $endfor$
33 </div>
34 $endif$
33 $endfor$ 35 $endfor$
34 </div> 36 </div>
35 </div> 37 </div>