Marco's notes

zola

About Zola

updated date can include in md header

// content/zola.md
+++
title = "zola"
description = "zola"
date = 2021-06-28
updated = 2021-07-01
+++

Meta Data can changed depends on md header

// templates/base.html
{% if page.title %}

{{ page.title }} - Marco's notes
{% else %}

Marco's notes
{% endif %}

Auto update updated time when saving file using vim.

autocmd BufWritePost *.md call ChangeUpdatedDate()
function ChangeUpdatedDate()
    silent! 5s/updated = \zs.*/\=system("date --rfc-3339=s")[:-2]
    execute "normal \"
endfunction

Formatting time using tera

{{ page.date | date(format="%v") }}