Windows can be used to interpolate the entirety of an idea’s content into a different context. They are useful in home pages or other sections that aggregate content.
Fundamentally, windows are a form of augmented hyperlink. They take their name from Ted Nelson’s notion of the transpointing window as they allow you to see the content on either side of the link (like a window).
Say you have an idea:
#idea("first-idea", title: [My first idea])You can produce a window on this idea like so:
#import "@rookery/core:0.1.0": window
#window(<first-idea>)Note that we do not need the idea: prefix. Like #hyperlink, #window is a function imported from rookery that already knows which namespace to look in.
By default, this window will be unfolded, showing the full content of the idea.
An idea that windows onto itself, or two ideas that window onto each other, can constitute an infinite loop that could therefore unfurl forever. In order to prevent this, rookery has a notion of window unfurl, which is set to 1 by default.
When a window is called at a level of recursion greater than the unfurl budget, rookery renders a call to #window as a link to the idea’s standalone page rather than as transcluded content. It’s best to think of window unfurl as a multiplier, as the amount of work rookery needs to do multiplies when you raise it.
You can set the unfurl budget per window, or site-wide:
#show: rookery.with(window-unfurl: 1)
#window(<first-idea>)
#window(<first-idea>, unfurl: 2)Here is a window on this selfsame idea. Because this documentation uses the default unfurl of 1, it only recurses as a window once, and then bottoms out as a link:
An idea that windows onto itself, or two ideas that window onto each other, can constitute an infinite loop that could therefore unfurl forever. In order to prevent this, rookery has a notion of window unfurl, which is set to 1 by default.
When a window is called at a level of recursion greater than the unfurl budget, rookery renders a call to #window as a link to the idea’s standalone page rather than as transcluded content. It’s best to think of window unfurl as a multiplier, as the amount of work rookery needs to do multiplies when you raise it.
You can set the unfurl budget per window, or site-wide:
#show: rookery.with(window-unfurl: 1)
#window(<first-idea>)
#window(<first-idea>, unfurl: 2)Here is a window on this selfsame idea. Because this documentation uses the default unfurl of 1, it only recurses as a window once, and then bottoms out as a link: