summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.vscode/settings.json5
-rw-r--r--assets/css/_basics.scss4
-rw-r--r--content/blog/index.md5
-rw-r--r--content/index.md4
-rw-r--r--content/notebook/index.md5
-rw-r--r--content/pers_notebook/index.md5
-rw-r--r--content/pers_notebook/infinite-skyscrapers.md (renamed from content/personal_blog/2021-01-09-infinite-skyscrapers.md)0
-rw-r--r--content/personal_blog/index.md5
-rw-r--r--metadata/metadata.yaml20
-rw-r--r--scripts/metadata_filter.lua25
-rw-r--r--templates/base.html2
-rw-r--r--templates/layouts/categorized_list.html22
-rw-r--r--templates/layouts/page.html4
13 files changed, 78 insertions, 28 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 808b831..2fc142c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,3 +1,6 @@
1{ 1{
2 "git.enableCommitSigning": false 2 "git.enableCommitSigning": false,
3 "Lua.diagnostics.globals": [
4 "pandoc"
5 ]
3} 6}
diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss
index 14c0391..9ce6b61 100644
--- a/assets/css/_basics.scss
+++ b/assets/css/_basics.scss
@@ -97,6 +97,10 @@ ol {
97 } 97 }
98} 98}
99 99
100ul ul {
101 margin-top: 0;
102}
103
100dl { 104dl {
101 margin: ($line-height * 1em) 0 0; 105 margin: ($line-height * 1em) 0 0;
102 padding: 0; 106 padding: 0;
diff --git a/content/blog/index.md b/content/blog/index.md
deleted file mode 100644
index 6668eba..0000000
--- a/content/blog/index.md
+++ /dev/null
@@ -1,5 +0,0 @@
1---
2title: Blog
3layout: dated_list
4create_feed: true
5---
diff --git a/content/index.md b/content/index.md
index 169a791..ebd3ff4 100644
--- a/content/index.md
+++ b/content/index.md
@@ -14,5 +14,9 @@ Here's a complete list of my profiles on other platforms:
14- **Email:** me@volpeon.ink 14- **Email:** me@volpeon.ink
15- **Fediverse:** @volpeon@fedi.vulpes.one 15- **Fediverse:** @volpeon@fedi.vulpes.one
16- **GitHub:** [volpeon](https://github.com/volpeon) 16- **GitHub:** [volpeon](https://github.com/volpeon)
17- **IRC - Furnet:** volpeon
18- **IRC - Freenode:** volpeon
19- **Steam:** [volpeon](https://steamcommunity.com/id/volpeon/)
20- **XMPP:** <available>
17 21
18If you see someone with my username, you'll know it's me if their profile is listed here. I'll make sure to keep this list up-to-date. 22If you see someone with my username, you'll know it's me if their profile is listed here. I'll make sure to keep this list up-to-date.
diff --git a/content/notebook/index.md b/content/notebook/index.md
new file mode 100644
index 0000000..1175625
--- /dev/null
+++ b/content/notebook/index.md
@@ -0,0 +1,5 @@
1---
2title: Notebook
3layout: categorized_list
4create_feed: true
5---
diff --git a/content/pers_notebook/index.md b/content/pers_notebook/index.md
new file mode 100644
index 0000000..235ae57
--- /dev/null
+++ b/content/pers_notebook/index.md
@@ -0,0 +1,5 @@
1---
2title: Personal Notebook
3layout: categorized_list
4create_feed: true
5---
diff --git a/content/personal_blog/2021-01-09-infinite-skyscrapers.md b/content/pers_notebook/infinite-skyscrapers.md
index 909ecce..909ecce 100644
--- a/content/personal_blog/2021-01-09-infinite-skyscrapers.md
+++ b/content/pers_notebook/infinite-skyscrapers.md
diff --git a/content/personal_blog/index.md b/content/personal_blog/index.md
deleted file mode 100644
index 8f4484b..0000000
--- a/content/personal_blog/index.md
+++ /dev/null
@@ -1,5 +0,0 @@
1---
2title: Personal Blog
3layout: dated_list
4create_feed: true
5---
diff --git a/metadata/metadata.yaml b/metadata/metadata.yaml
index 05150ea..522896d 100644
--- a/metadata/metadata.yaml
+++ b/metadata/metadata.yaml
@@ -11,25 +11,25 @@ menus:
11 - id: index 11 - id: index
12 label: Home 12 label: Home
13 url: / 13 url: /
14 - id: blog 14 - id: notebook
15 label: Blog 15 label: Notebook
16 url: /blog/ 16 url: /notebook/
17 hidden: true 17 hidden: true
18 - id: personal_blog 18 - id: pers_notebook
19 label: Personal 19 label: Personal
20 label_long: Personal Blog 20 label_long: Personal Notebook
21 url: /personal_blog/ 21 url: /pers_notebook/
22 hidden: true 22 hidden: true
23 23
24feeds: 24feeds:
25 - title: Blog 25 - title: Notebook
26 url: /blog/index.xml 26 url: /notebook/index.xml
27 27
28categories: 28categories:
29 personal_blog: 29 pers_notebook:
30 dre: Dream Journal 30 dre: Dream Journal
31 31
32rewrites: 32rewrites:
33 path: 33 path:
34 - from: ^/personal_blog 34 - from: ^/pers_notebook
35 to: /9thPK7O3xn 35 to: /9thPK7O3xn
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index d7116dc..cd0c2f7 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -183,20 +183,28 @@ function organize_subpages(site_url, output_dir, ref_file, pages)
183 pandoc.utils.stringify(page.file_out)) 183 pandoc.utils.stringify(page.file_out))
184 end 184 end
185 185
186 local grouped_pages = group_by(pages, function(p) return not p.date end) 186 local pages_grouped_date =
187 group_by(pages, function(p) return not p.date end)
187 188
188 local pages_undated = grouped_pages[true] or pandoc.MetaList({}) 189 local pages_undated = pages_grouped_date[true] or pandoc.MetaList({})
189 pages_undated:sort(function(p1, p2) 190 pages_undated:sort(function(p1, p2)
190 return pandoc.utils.stringify(p1.title) < 191 return pandoc.utils.stringify(p1.title) <
191 pandoc.utils.stringify(p2.title) 192 pandoc.utils.stringify(p2.title)
192 end) 193 end)
193 194
194 local pages_dated = grouped_pages[false] or pandoc.MetaList({}) 195 local pages_dated = pages_grouped_date[false] or pandoc.MetaList({})
195 pages_dated:sort(function(p1, p2) 196 pages_dated:sort(function(p1, p2)
196 return pandoc.utils.stringify(p1.date.yyyy_mm_dd) > 197 return pandoc.utils.stringify(p1.date.yyyy_mm_dd) >
197 pandoc.utils.stringify(p2.date.yyyy_mm_dd) 198 pandoc.utils.stringify(p2.date.yyyy_mm_dd)
198 end) 199 end)
199 200
201 local pages_categorized = pages:filter(
202 function(p) return p.category ~= nil end)
203 pages_categorized:sort(function(p1, p2)
204 return pandoc.utils.stringify(p1.title) >
205 pandoc.utils.stringify(p2.title)
206 end)
207
200 local pages_by_year = group_by(pages_dated, function(p) 208 local pages_by_year = group_by(pages_dated, function(p)
201 return pandoc.utils.stringify(p.date.yyyy) 209 return pandoc.utils.stringify(p.date.yyyy)
202 end) 210 end)
@@ -205,14 +213,23 @@ function organize_subpages(site_url, output_dir, ref_file, pages)
205 return i1.key > i2.key 213 return i1.key > i2.key
206 end)) 214 end))
207 215
216 local pages_by_category = group_by(pages_categorized, function(p)
217 return pandoc.utils.stringify(p.category.id)
218 end)
219 pages_by_category = pandoc.MetaList(table_to_list(pages_by_category,
220 function(i1, i2)
221 return i1.key > i2.key
222 end))
223
208 local pages_data = pandoc.MetaMap({ 224 local pages_data = pandoc.MetaMap({
209 all_dated = pages_dated, 225 all_dated = pages_dated,
210 all_undated = pages_undated, 226 all_undated = pages_undated,
211 by_year = pages_by_year, 227 by_year = pages_by_year,
228 by_category = pages_by_category,
212 last_update = #pages_dated ~= 0 and pages_dated[1].last_update 229 last_update = #pages_dated ~= 0 and pages_dated[1].last_update
213 }) 230 })
214 231
215 local categories_data = group_by(pages_dated, function(p) 232 local categories_data = group_by(pages_categorized, function(p)
216 return p.category and pandoc.utils.stringify(p.category.id) 233 return p.category and pandoc.utils.stringify(p.category.id)
217 end, function(stats, _, p) 234 end, function(stats, _, p)
218 if not stats then 235 if not stats then
diff --git a/templates/base.html b/templates/base.html
index 08c85bb..3afa0f0 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -49,6 +49,8 @@
49${layouts/index()} 49${layouts/index()}
50 $elseif(layout.is_dated_list)$ 50 $elseif(layout.is_dated_list)$
51${layouts/dated_list()} 51${layouts/dated_list()}
52 $elseif(layout.is_categorized_list)$
53${layouts/categorized_list()}
52 $else$ 54 $else$
53${layouts/page()} 55${layouts/page()}
54 $endif$ 56 $endif$
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html
new file mode 100644
index 0000000..d213bb8
--- /dev/null
+++ b/templates/layouts/categorized_list.html
@@ -0,0 +1,22 @@
1<main class="c-page s-page l-container l-container--content l-container--pad-v">
2 <div class="c-page__content">
3 <h1 class="c-page__prefixed c-page__prefixed--h1">$title$</h1>
4$body$
5
6 $for(pages.by_category)$
7 <h2 class="c-page__prefixed c-page__prefixed--h2">
8 $for(it.value/first)$
9 $it.category.name$
10 $endfor$
11 </h2>
12 <ul>
13 $for(it.value)$
14 <li class="c-page__prefixed c-page__prefixed--ref">
15 <a href="$it.url.rel$">$it.title$</a>
16 </li>
17 $endfor$
18 </ul>
19 $endfor$
20 </div>
21</main>
22
diff --git a/templates/layouts/page.html b/templates/layouts/page.html
index 61bcacd..640df18 100644
--- a/templates/layouts/page.html
+++ b/templates/layouts/page.html
@@ -13,9 +13,7 @@
13 </div> 13 </div>
14 $endif$ 14 $endif$
15 <h1 class="c-page__prefixed c-page__prefixed--h1 c-page__header__title">$title$</h1> 15 <h1 class="c-page__prefixed c-page__prefixed--h1 c-page__header__title">$title$</h1>
16 $if(date)$ 16 $if(category)$
17 <h2 class="c-page__header__meta">$date.yyyy_mm_dd$$if(category)$ in $category.name$$endif$</h2>
18 $elseif(category)$
19 <h2 class="c-page__header__meta">in $category.name$</h2> 17 <h2 class="c-page__header__meta">in $category.name$</h2>
20 $endif$ 18 $endif$
21 </header> 19 </header>