diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f47778d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/content/archd +/content/archm +/content/archy diff --git a/config.toml b/config.toml index 6e9dbe7..e084a4b 100644 --- a/config.toml +++ b/config.toml @@ -11,3 +11,6 @@ unsafe= true [permalinks] [permalinks.page] artigos = "/:year/:month/:day/:filename" + archd = "/:year/:month/:day/" + archm = "/:year/:month/" + archy = "/:year/" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c86415c..0c58edf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -55,7 +55,7 @@ diff --git a/layouts/archd/single.html b/layouts/archd/single.html new file mode 100644 index 0000000..00a2c9d --- /dev/null +++ b/layouts/archd/single.html @@ -0,0 +1,27 @@ +{{ define "main" }} +

Arquivos diários: {{ time.Format "02 de January 2006" .Date }}

+ + {{ $year := .Date.Format "2006-01-02" }} + +{{ end }} diff --git a/layouts/archm/single.html b/layouts/archm/single.html new file mode 100644 index 0000000..a1974f7 --- /dev/null +++ b/layouts/archm/single.html @@ -0,0 +1,29 @@ +{{ define "main" }} +

Arquivos mensais: {{ time.Format "January 2006" .Date }}

+ + {{ $year := .Date.Format "2006-01" }} + +{{ end }} + + diff --git a/layouts/archy/single.html b/layouts/archy/single.html new file mode 100644 index 0000000..0f41d74 --- /dev/null +++ b/layouts/archy/single.html @@ -0,0 +1,28 @@ +{{ define "main" }} +

Arquivos anuais: {{ .Date.Format "2006" }}

+ + {{ $year := .Date.Format "2006" }} + +{{ end }} + diff --git a/mkarchive.sh b/mkarchive.sh new file mode 100755 index 0000000..a267251 --- /dev/null +++ b/mkarchive.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +mkdir -p content/archd +mkdir -p content/archm +mkdir -p content/archy + +ack -hm 1 "^date:" content/artigos | sed -e 's/^date: \(....\)-..-.. ..:..:../\1/' | sort -u | + while read archy; do echo -e "---\ndate: $archy-01-01 00:00:00\n---" > content/archy/$archy.md; done +ack -hm 1 "^date:" content/artigos | sed -e 's/^date: \(....-..\)-.. ..:..:../\1/' | sort -u | + while read archm; do echo -e "---\ndate: $archm-01 00:00:00\n---" > content/archm/$archm.md; done +ack -hm 1 "^date:" content/artigos | sed -e 's/^date: \(....-..-..\) ..:..:../\1/' | sort -u | + while read archd; do echo -e "---\ndate: $archd 00:00:00\n---" > content/archd/$archd.md; done + diff --git a/static/styles.css b/static/styles.css index d1fc374..4e7ac57 100644 --- a/static/styles.css +++ b/static/styles.css @@ -94,6 +94,7 @@ hr { background-image: url(/widget-divider.png); } +.byline { clear: both; padding-top: 1rem; } .articles:not(.detailed) .byline { display: none; } .articles:not(.detailed) { border-top: none; padding-top: 0.5rem; }