Greg's Thoughts


Making The Blog Part 2: Indexing

Well, shit. Now what do I do?

We need a way to show most recent posts and related posts. This changes the processing from single pass to a multipass system.

This is also the first decision where I go from chronological order to an application-like system.

Overall, there's a couple things that I want to have happen.

  1. A chronological "River", basically everything that I ever post, in chronological order.
  2. Tags, where you can find related articles.
  3. the site can append related articles to a page. These are manually selected.
  4. Hub pages, where I can see where related pages.
  5. Hub pages, where I can generate content from summary fragments of other pages.

I don't want this to be a zettlekasten, so maybe manually curated summaries are better. But I do want this to be a easy, not heavily manual process.

Questions:

Can I do this entirely with templates? If so, how?

I think so. The text/template page has a way to do this. You can include other templates in that.

I think what I want is an index_by field in the map. That would be like

index_by:
  date: 2024-04-03
  tags:
    - April
    - Dewblog
    - Making the Blog
  feature: Dewblog

Then I can expose this to the template as a map.

{{range .index_by.tags.Dewblog}}`{{template summary.tmpl .}}{{end}

This would be a pretty neat, flexible and non-Dewblog-specific method of indexing. A couple considerations factor in:

  1. How do we exclude or limit these items? Don't. Just include all of it. Smarter limiting, sorting and filtering can wait until it's needed.
  2. How does this get built into the summary page? Well, in addition to the parsed representation for the indeces, you can build another index ordered by date.

What do you think?