Skip to content

Feature: "Lite" Mode

h3rald edited this page Oct 23, 2010 · 7 revisions

It should be possible to compile single files, without having to create a Glyph project. This can be useful to compile short articles which normally wouldn’t justify a full-blown Glyph project.

Updates to the ‘glyph compile’ command

Use glyph compile as follows:

glyph compile source-file [ destination-file ]

Where:

  • source-file is the path (absolute or relative to PWD) to the file to compile.
  • destination-file is the path (absolute or relative to PWD) to the output file. If not specified:
    • The output file will be placed in the same directory as the source file
    • It will have the same file name as the source file, with the extension changed to document.output.

Gotchas

  • Snippets can only be defined inside the source file, using the &:[] macro.
  • Project configuration settings can only be defined inside the .glyph file, using the $:[] macro.
  • Custom macros can only be defined inside the .glyph file, using the %:[] macro.
  • Images must be linked with their absolute path, or a path relative to PWD, and will not be copied anywhere when the output file is generated.
  • Stylesheets must be referenced with their absolute path, a path relative to PWD, or the name of an existing Glyph system stylesheet.
  • The include[] macro does not work (if you need to include other text files, you should probably use a Glyph project…)