Instead of populating an articles table by hand, load it from articles fs.
This commit is contained in:
parent
f18cc3c44e
commit
062139185c
@ -41,7 +41,7 @@ func (h *Handlers) Index(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) Stuff(w http.ResponseWriter, r *http.Request) {
|
||||||
web.Stuff("/ Stuff", util.GetServiceByHost(r.Host, util.ServiceGit),
|
web.Stuff("/ Stuff", util.GetServiceByHost(r.Host, util.ServiceGit),
|
||||||
util.GetServiceByHost(r.Host, util.ServiceFiles), w)
|
util.GetServiceByHost(r.Host, util.ServiceFiles), web.GetArticlesMetadata(), w)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
func (h *Handlers) Mindflow(w http.ResponseWriter, r *http.Request) {
|
||||||
|
@ -11,37 +11,18 @@ block nav
|
|||||||
h1 Stuff
|
h1 Stuff
|
||||||
|
|
||||||
block content
|
block content
|
||||||
:go:func Stuff(title, git_site, files_site string)
|
:go:func Stuff(title, git_site, files_site string, metadata []ArticleMetadata)
|
||||||
p.center Here lies everything I've made that I'm willing to share.
|
p.center Here lies everything I've made that I'm willing to share.
|
||||||
section#articles
|
section#articles
|
||||||
h2 Articles
|
h2 Articles
|
||||||
p These articles are more like the sysadmin's notes. I describe those parts here that I did myself. The date here represents when article was updated last time.
|
p These articles are more like the sysadmin's notes. I describe those parts here that I did myself. The date here represents when article was updated last time.
|
||||||
table
|
table
|
||||||
|
each entry in metadata
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
time(datetime='2022-05-20') 20 May 2022
|
time(datetime=entry.Date.Format("2006-02-01")) #{entry.Date.Format("01 January 2006")}
|
||||||
td
|
td
|
||||||
a(href='stuff/article/hardening_mikrotik') Hardening Mikrotik
|
a(href=entry.URL) #{entry.Title}
|
||||||
tr
|
|
||||||
td
|
|
||||||
time(datetime='2021-11-15') 15 November 2021
|
|
||||||
td
|
|
||||||
a(href='stuff/article/nginx_recipes_and_tips') NGiNX's recipes & tips
|
|
||||||
tr
|
|
||||||
td
|
|
||||||
time(datetime='2022-07-17') 17 July 2022
|
|
||||||
td
|
|
||||||
a(href='stuff/article/setting_up_a_mail_server') Setting up a mail server
|
|
||||||
tr
|
|
||||||
td
|
|
||||||
time(datetime='2020-08-15') 15 August 2020
|
|
||||||
td
|
|
||||||
a(href='stuff/article/setting_up_a_tor_proxy_relay_hiddenserv') Setting up a Tor proxy, relay and hidden service
|
|
||||||
tr
|
|
||||||
td
|
|
||||||
time(datetime='2022-05-19') 19 May 2022
|
|
||||||
td
|
|
||||||
a(href='stuff/article/rpi_root_on_external_drive') How to move a root partition from SD card off to external drive on Raspberry Pi
|
|
||||||
section#programs-scripts
|
section#programs-scripts
|
||||||
h2 Programs and scripts
|
h2 Programs and scripts
|
||||||
p.center Simple, yet useful (at least for me) programs and scripts I made.
|
p.center Simple, yet useful (at least for me) programs and scripts I made.
|
||||||
|
Loading…
Reference in New Issue
Block a user