Pinjasaur / bic

Static blog generator, in bash
https://bic.sh/
10 stars 1 forks source link

Tag support #10

Closed Pinjasaur closed 3 months ago

Pinjasaur commented 2 years ago

A major feature that would be worth considering support for would be arbitrary tags to help categorize posts.

High level scope:

An initial proposal of a hypothetical markdown document:

# My title
tags: foo, bar, baz

Here are some words.

Lorem ipsum.

I'm partial to /tags and /tags/{tag} since it's more of a RESTful syntax.

Open questions:

Pinjasaur commented 2 years ago

cc @mfossen thoughts?

Pinjasaur commented 1 year ago

Going through some old notes I found some thoughts I had jotted down. Added a few more, too. But, I think technically speaking, this can be implemented using a declare -A ALL_TAGS to create an associative array data structure containing the tags as keys e.g. mytag and the values as a delimited string of posts e.g. posts/foo.md:posts/bar.md.

image

Pinjasaur commented 1 year ago

mo's @key support could be handy e.g. mapping a tag to a slug https://github.com/tests-always-included/mo#loop-key

Pinjasaur commented 8 months ago

I'm also considering using the relatively common YAML frontmatter, e.g.

---
tags: foo, bar, baz
---
# My Title

Words and stuff.

cc @mfossen