Glyph - Creating your first Glyph Project

← Acknowledgements | Contents | Document Structure →

To install Glyph, simply run gem install glyph, like with any other Ruby gem. Then, create a new directory and initialize a new Glyph project, like so:

mkdir test_document

cd test_document

glyph init

That’s it. You just created a new Glyph project in the test_document directory.

Glyph’s dependencies

Glyph requires the following gems:

  • extlib
  • gli
  • rake

Additionally, some Glyph macros may require additional gems, such as:

  • RedCloth (textile macro)
  • BlueCloth or RDiscount or Maruku or Kramdown (markdown macro)
  • Sass (if you want to load .sass files with the style macro)
  • CodeRay or UltraViolet (highlight macro)
  • directory_watcher (to use auto-regeneration with the compile command)

Every Glyph project is comprised of the following directories:

  • images/ — used to store the image files used in your document.
  • lib/ — used to store your custom Glyph macros and Rake tasks.
  • output/ — used to store your generated output files.
  • styles/ — used to store your stylesheets.
  • text/ — used to store your source text files.

Additionally, the following files are also created at top level:

← Acknowledgements | Contents | Document Structure →