Links and rules

Created at
02 February 2024
Last modified
02 February 2024
Tagged

How do links work in the garden? How does the garden work at all?

This is likely to be a bit of a design document for the garden.

Markup

You can mark up a link using double-brackets ie [[Something]]. This will then display the text Something and link to the garden page something/. Of note:

  • Assumed all garden page URLs are lower case
  • Special characters and spaces replaced with underscores when converting from title to URL.
  • No more than one underscore in a row, no leading or trailing underscore, for URLs

So for example, Boondoggles? will have the URL boondoggles.

You can always specify eg [[link_here|Some Text]], which will display Some Text but will link to the garden page link_here.

Folders

Garden nodes can exist in folders. These act as namespaces. So for example for my series on the world of Chasm, I can put everything in a folder labelled chasm/. My intro page could have the URL chasm/intro. That’s cool.

How does linking look for these? I can link to that intro page with, for example, [[Chasm/Intro]], and:

  • URL will convert as normal, to chasm/intro (forward slashes are not considered to be special characters).
  • Title will conver to Intro. We don’t see the namespace in the link.

Books

A folder can be converted into a book by placing a file _book.md in the folder. This contains a book title and metadata, and will automatically mean 1klb treats the folder as a book.

Any node in a book will get a sidebar on the site, showing all other nodes in the book in a particular order. If a node has the order property in its frontmatter, it will go at the top of the “table of contents”, in the order of that property (so order: 1 goes before order: 2 goes before unordered pages). Any node with a negative order will go at the end, after unordered pages, with -1 going at the end, -2 going before it, etc.

_book.md files will not be converted to nodes.