Italian landscape with umbrella pines, painted by Hendrik Voogd

1 min read

A place for notes

A site for notes, and three languages I keep coming back to.

Hendrik Voogd, public domain

I wanted a page that loads, a typeface I can stand to read, and a folder of files I can edit without an account. This is that page. The next one in the series is A second note.

What gets written down#

A column of text. A dark mode that does not flash white. Search that still works after the page is built. The painting at the top is Hendrik Voogd's Italian landscape with umbrella pines.[1]

Three snippets#

These are the languages I reach for when a note turns into a program.

Rust#

fn slug(title: &str) -> String {
    title
        .split_whitespace()
        .map(|word| word.to_lowercase())
        .collect::<Vec<_>>()
        .join("-")
}

Kotlin#

data class Note(val title: String, val tags: List<String>)

fun Note.isTagged(tag: String) = tag in tags

Go#

package notes

import "strings"

func Slug(title string) string {
	return strings.ToLower(strings.Join(strings.Fields(title), "-"))
}

How a post gets published#

flowchart LR
  markdown[Markdown] --> zola[Zola]
  zola --> pagefind[Pagefind]
  pagefind --> pages[GitHub Pages]

Zola renders the HTML. Pagefind indexes it. GitHub Pages serves the folder.[2]

  1. Italian landscape with umbrella pines, public domain. ↩

  2. A file with draft = true stays out of that folder until the flag is removed. ↩