hugo content template
·
2 mins read
·
edit
notes
- It is initialized on 31-oct-2025 but undocumented. The date is from file metadata.
- It is updated on 17-feb-2026 with table and entry about daily note init.
- File
archetypes/default.md - Pros: Do not need to create table in danote hote everyday.
- Cons: For non-danote, the table must be erased, which is easier than to copy-past from previous danote.
- File
template
{{- $words := split .Name "-" -}}
{{- $title := delimit (after 1 $words) " " -}}
{{- $filepath := path.Clean .File.Path -}}
{{- $parts := split $filepath "/" -}}
{{- $file := index (last 1 $parts) 0 -}}
{{- $parts1 := first 2 (after 1 $parts) -}}
{{- $parts2 := first 1 (split $file "-") -}}
{{- $surl := $parts1 | append $parts2 -}}
{{- $url := delimit $surl "" -}}
{{- $pathtofile := delimit ($parts1 | append $file) "/" -}}
{{- $hhmm := (time .Date).Format "1504" -}}
+++
title = '{{ $title }}'
date = '{{ .Date }}'
authors = ['viridi']
draft = true
type = 'notes'
tags = []
categories = []
pathtofile = '{{ $pathtofile }}'
url = '{{ $url }}'
+++
<!-- more -->
{{< style class="table-0" >}}
id | activity | status | link | beg | and | doc
:-: | :- | :-: | :-: | :-: | :-: | :-:
01 | beg daily note ( , ✓, ×) entry | 1 | [{{ $url }}](/{{ $url }}/) | {{ $hhmm }} | e | ✓
|
{{< /style >}}