Pulling together the pieces of a document using include pragmas is fine, but blue-phrase goes one further with its innovative enclosure templating.
Enclosures are a way to wrap a portion of your body matter with template-driven framing. This innovative approach to templates opens up new possibilities. Two of the most exciting are:
Allowing complex decorations to be applied to elements without cluttering up your main composition.
Wrapping the entire body of your composition with headers, footers, and menus.
The blue-phrase enclosure pragma behaves similar to its cousin, the include pragma, but instead of injecting the contents of the template file into your composition, it wraps the template file's contents around a portion of your composition.
The enclosure notation is straightforward: it identifies an element or class of elements as its target, and it specifies where your target matter should be placed within its body.
Here's an enclosure pragma that targets a single element of your composition with an identifier of #story:
!enclosure #story `./enclosures/story.blue`
Here's an enclosure pragma that targets every element in your composition that has a classname of .team-member:
A target-matter pragma is added somewhere within each template file, which becomes the point at which your composition's inner content is placed. Here's what a story.blue template file might look like:
And here's what a team-member.blue template file might look like:
To continue the example, consider a composition that contains this:
When compiled, the resulting HTML will be wrapped with the template content from the two enclosures and will look like this:
With enclosures, you can dramatically simplify your compositions and supercharge your templates!
BLUE-PHRASE BasicsGetting started with symbolic endophrasing. Learn how to author documents with many of the commonly used typographic techniques found in word processors, by using BLUE-PHRASE symbolic endophrasing. There are only a few basic rules to learn.
BLUE-PHRASE EssentialsA primer for effectively using BLUE-PHRASE. Learn the essentials necessary to effectively use BLUE-PHRASE, and discover techniques to perform commonly occurring tasks with greater ease using shorthand notation.
BLUE-PHRASE + CSSThe fundamentals of styling Learn how to style BLUE-PHRASE with Cascading Style Sheets.
BLUE-PHRASEHTML templating and blogging. A computer language for solving problems related to reading, writing, and publishing.
READ WRITE GROKA different take on a tech blog. Follow along as Tangled Web Services boldly goes where tech has gone before.
Read Write Tools is able to offer free and low-cost software products because it has low overhead and limited staff. We are happy to answer your customer service and technical support questions when our self-service options aren't able to meet your needs.
Many of the most common customer service issues can be resolved without our help. Check the licensing and accounts pages for ways to resolve issues related to registration, customer numbers, passwords and access keys.
Technical support issues can sometimes be resolved using one of the public forums like Stack Overflow, so search for error messages, blue-phrase syntax questions, and technical problems there. For best results include the name of the product in your search, like rwdoc, rwreuse, rwserve, etc.
Read Write Tools Software License Agreement. The ReadWriteView, ReadWriteNote, ReadWriteDoc, and ReadWriteReuse desktop applications; and the ReadWriteServe server software may be used only in conjunction with the purchase of a software license.
Read Write ToolsOpen Source Software. Read Write Tools publishes some of its software portfolio under open source licenses, including RWSERVE plugins, web components, CSS style sheets, editor themes, command line build tools, and Node.js libraries. These are covered by two different open source licenses: the MIT license or the Creative Commons CC-BY-NC-ND 4.0 (Attribution-NonCommercial-NoDerivatives 4.0 International). See each individual file or its associated README file to learn which applies.
While you are browsing our website, we log all HTTPS requests from your browser and all responses by our servers.
Each time you use our software, we verify the authenticity of your license key using the device address of your computer, and the IP address of your computer network. We use this data to prevent piracy, and to block unlicensed use of our software.