image

RubyFrontier Documentation

Glossary Expansion

The glossary expansion mechanism in RubyFrontier is used solely as a way of allowing href attributes in <a> tags to be abbreviated. For example, if you frequently want to say http://www.apple.com, you could code that as "apple" in an href attribute. In other words, you might say <a href="apple"> and this would be turned for you into <a href="http://www.apple.com"> at the appropriate moment in the page-rendering process.

The glossary is a hash, so glossary entries are hash entries (key-value pairs). To get an entry into the glossary, put it either in a #glossary.yaml file in the source folder or in the user glossary. When the page table is built, #glossary.yaml entries are folded together. Glossary entry keys should be strings (not symbols).

The main requirement for use of the glossary mechanism is that the key should not contain a dot or a colon-slash-slash. That’s because the glossary mechanism is run as part of the autoglossary mechanism, which will not consider an href attribute eligible for glossary expansion if it looks like a real URL.

NOTE for Frontier users: The glossary mechanism in Frontier suffered from some problems: it was overloaded, and glossary resolution took place too late in the page rendering process for many purposes. In RubyFrontier, therefore, the Frontier glossary mechanism is split into three pieces:

Next: Filters

This documentation prepared by Matt Neuburg, phd = matt at tidbits dot com (http://www.apeth.net/matt/), using RubyFrontier.
Download RubyFrontier from GitHub.