all repos — h3rald @ 22c6126ca58625f1f2cfa8a5000f2d3315b304f3

The sources of https://h3rald.com

content/glyph/book/compiling/lite_mode.html

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
-----
permalink: lite_mode
title: Glyph – Compiling single Glyph files
type: page
-----
<nav class="navigation"><a href="/glyph/book/compiling/compiling.html">← Compiling a project</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/compiling/programmatic_usage.html">Using Glyph programmatically →</a></nav>
  <p>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.</p>
  <p>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 <a href="/glyph/book/ref_commands.html#c_compile"><code>compile</code></a> command, like this:</p>
  <p>
<code>glyph compile source.glyph destination.htm</code>
</p>
  <p>This command will process a file called <code>source.glyph</code> and produce an HTML file called <code>destination.htm</code>.</p>
  <section class="section">
<header><h1 id="lite_limitations" class="toc">Limitations</h1></header>
<p>This sort of &#8220;lite&#8221; mode comes with a few minor limitations:</p>
<ul>
	<li>Snippets can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_snippet_"><code>snippet:</code></a> macro.</li>
	<li>Project configuration settings can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_config_"><code>config:</code></a> macro.</li>
	<li>Custom macros can only be defined inside the source file, using the <a href="/glyph/book/macros/macros_core.html#m_macro_"><code>macro:</code></a> macro.</li>
	<li>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.</li>
	<li>Stylesheets must be referenced with their absolute path, or a path relative to the current directory, or the name of an existing Glyph <a href="/glyph/book/text_editing/stylesheets.html#default_stylesheets">system stylesheet</a>.</li>
	<li>The files included through the <a href="/glyph/book/macros/macros_core.html#m_include"><code>include</code></a> macro must be referenced with their absolute path, or a path relative to the current directory.</li>
</ul>

</section>
<nav class="navigation"><a href="/glyph/book/compiling/compiling.html">← Compiling a project</a> | <a href="/glyph/book/index.html">Contents</a> | <a href="/glyph/book/compiling/programmatic_usage.html">Using Glyph programmatically →</a></nav>