Page Amalgamation

Page Amalgamation

A page amalgamation is a way to use the zet to generate a list of page links with summaries. An example of such pages include food and projects.

A wiki page foo must have an entry created in the zet via:

weewiki zet mkpage foo

A page can have a summary tied to it, which will get printed next to the page link in the amalgamation. This is done by creating a variable called "blurb" tied to the page's UUID.

The shell script I use to add blurbs to things is shown below:

#!/bin/sh

if [[ "$#" -eq 0 ]]
then
    echo "Usage: $0 page"
fi

PAGE="!$1"

# var new won't do anything if it exists already
weewiki zet var new $PAGE blurb
weewiki zet var set $PAGE blurb

Then, this page must be tied to a particular amalgamation group bar using:

weewiki zet tie !foo @bar

(note that on bash, you may need to escape the '!').

Finally, in a wiki page you want to generate the list for, add this inline Janet code:

@!(zet/page-amalg "foo")!@

The janet code isn't available to the general public, but anyone who wants to take a look at it can feel free to email me about it.


home | index