Glyph's primary goal is to author complex documents like books or manuals. In order to do so, a Glyph project is required to keep everything organized and automated via a set of predefined conventions, exactly like Ruby on Rails or other similar frameworks do.
If you want to write a one-page article or a short draft, however, creating and managing Glyph projects can be an
unnecessary burden. Luckily, you don't have to: you can use Glyph to compile single files containing Glyph code, by
adding one parameter (or two if you want to specify a custom destination file) to the compile
command, like this:
glyph compile source.glyph destination.htm
This command will process a file called source.glyph
and produce an HTML file called
destination.htm
.
Limitations
This sort of “lite” mode comes with a few minor limitations:
- Snippets can only be defined inside the source file, using the
snippet:
macro. - Project configuration settings can only be defined inside the source file, using the
config:
macro. - Custom macros can only be defined inside the source file, using the
macro:
macro. - Images must be referenced with their absolute path, or a path relative to the current directory, and will not be copied anywhere when the output file is generated.
- Stylesheets must be referenced with their absolute path, or a path relative to the current directory, or the name of an existing Glyph system stylesheet.
- The files included through the
include
macro must be referenced with their absolute path, or a path relative to the current directory.