NimYAML/nimdoc.cfg

163 lines
5.1 KiB
INI

# This is the config file for the documentation generator.
# (c) 2012 Andreas Rumpf
# Feel free to edit the templates as you need. If you modify this file, it
# might be worth updating the hardcoded values in packages/docutils/rstgen.nim
split.item.toc = "20"
# too long entries in the table of contents wrap around
# after this number of characters
doc.section = """
<section id="$sectionID">
<h1><a class="toc-backref" href="#$sectionID">$sectionTitle</a></h1>
<dl class="item">
$content
</dl></section>
"""
doc.section.toc = """
<li>
<a class="reference reference-toplevel" href="#$sectionID" id="$sectionTitleID">$sectionTitle</a>
<ul class="simple simple-toc-section">
$content
</ul>
</li>
"""
# Chunk of HTML emitted for each entry in the HTML table of contents.
# Available variables are:
# * $desc: the actual docstring of the item.
# * $header: the full version of name, including types, pragmas, tags, etc.
# * $header_plain: like header but without HTML, for attribute embedding.
# * $itemID: numerical unique entry of the item in the HTML.
# * $itemSym: short symbolic name of the item for easier hyperlinking.
# * $itemSymEnc: quoted version for URLs or attributes.
# * $itemSymOrID: the symbolic name or the ID if that is not unique.
# * $itemSymOrIDEnc: quoted version for URLs or attributes.
# * $name: reduced name of the item.
# * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used).
doc.item = """
<dt id="$itemSym"><a name="$itemSymOrID"></a><pre>$header</pre></dt>
<dd>
$desc
$seeSrc
</dd>
"""
# Chunk of HTML emitted for each entry in the HTML table of contents.
# See doc.item for available substitution variables.
doc.item.toc = """
<li><a class="reference" href="#$itemSymOrIDEnc"
title="$header_plain">$name</a></li>
"""
# HTML rendered for doc.item's seeSrc variable. Note that this will render to
# the empty string if you don't pass anything through --docSeeSrcURL. Available
# substitutaion variables here are:
# * $path: relative path to the file being processed.
# * $line: line of the item in the original source file.
# * $url: whatever you did pass through the --docSeeSrcUrl switch (which also
# gets variables path/line replaced!)
doc.item.seesrc = """&nbsp;&nbsp;<a
href="${url}/${path}#L${line}"
class="link-seesrc" target="_blank">Source</a>"""
doc.toc = """
<ul class="simple simple-toc" id="toc-list">
$content
</ul>
"""
doc.body_toc = """
<div class="row">
<div class="three columns">
$tableofcontents
</div>
<div class="nine columns" id="content">
<p class="module-desc">$moduledesc</p>
$content
</div>
</div>
"""
doc.body_no_toc = """
$moduledesc
$content
"""
doc.listing_start = "<pre class = \"listing\">"
doc.listing_end = "</pre>"
doc.file = """
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>NimYAML - $title</title>
<link href="/docutils.css" rel="stylesheet" type="text/css"/>
<link href="/style.css" rel="stylesheet" type="text/css"/>
<link href='http://fonts.googleapis.com/css?family=Raleway:400,600,900' rel='stylesheet' type='text/css'/>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</head>
<body>
<header>
<a class="pagetitle" href="/index.html">NimYAML</a></span>
<span><a href="/index.html">Home</a></span>
<span><a href="/testing.html">Testing Ground</a></span>
<span>Docs:</span>
<a href="/api.html">Overview</a>
<span>
<a href="/serialization.html">Serialization</a>
<ul>
<li><a href="/serialization.html">Overview</a></li>
<li><a href="/schema.html">Schema</a></li>
</ul>
</span>
<span>
<a href="/api/yaml.html">Modules</a>
<ul class="monospace">
<li><a href="/api/yaml.html">yaml</a></li>
<li><a href="/api/annotations.html">yaml/annotations</a></li>
<li><a href="/api/data.html">yaml/data</a></li>
<li><a href="/api/dom.html">yaml/dom</a></li>
<li><a href="/api/dumping.html">yaml/dumping</a></li>
<li><a href="/api/hints.html">yaml/hints</a></li>
<li><a href="/api/loading.html">yaml/loading</a></li>
<li><a href="/api/native.html">yaml/native</a></li>
<li><a href="/api/parser.html">yaml/parser</a></li>
<li><a href="/api/presenter.html">yaml/presenter</a></li>
<li><a href="/api/stream.html">yaml/stream</a></li>
<li><a href="/api/taglib.html">yaml/taglib</a></li>
<li><a href="/api/tojson.html">yaml/tojson</a></li>
</ul>
</span>
<span>
<a href="/migrating.html">NimYAML 2.x</a>
</span>
<span class="space"></span>
<span>
<a href="https://github.com/flyx/NimYAML">
<img src="/github-mark-white.svg" style="width: 1.5em; height: 1.5em; margin-bottom: -.2em; padding-right: .2em; margin-top: -.5em;" /> Source on GitHub
</a>
</span>
</header>
<article id="documentId">
<div class="container">
<h1 class="title">$title</h1>
$content
<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small>Made with Nim.</small>
</div>
</div>
</div>
</article>
</body>
</html>
"""