/ nimdoc.cfg
nimdoc.cfg
1 # This is the config file for the documentation generator. 2 # (c) 2012 Andreas Rumpf 3 # Feel free to edit the templates as you need. If you modify this file, it 4 # might be worth updating the hardcoded values in packages/docutils/rstgen.nim 5 6 split.item.toc = "20" 7 # too long entries in the table of contents wrap around 8 # after this number of characters 9 10 doc.section = """ 11 <section id="$sectionID"> 12 <h1><a class="toc-backref" href="#$sectionID">$sectionTitle</a></h1> 13 <dl class="item"> 14 $content 15 </dl></section> 16 """ 17 18 doc.section.toc = """ 19 <li> 20 <a class="reference reference-toplevel" href="#$sectionID" id="$sectionTitleID">$sectionTitle</a> 21 <ul class="simple simple-toc-section"> 22 $content 23 </ul> 24 </li> 25 """ 26 27 # Chunk of HTML emitted for each entry in the HTML table of contents. 28 # Available variables are: 29 # * $desc: the actual docstring of the item. 30 # * $header: the full version of name, including types, pragmas, tags, etc. 31 # * $header_plain: like header but without HTML, for attribute embedding. 32 # * $itemID: numerical unique entry of the item in the HTML. 33 # * $itemSym: short symbolic name of the item for easier hyperlinking. 34 # * $itemSymEnc: quoted version for URLs or attributes. 35 # * $itemSymOrID: the symbolic name or the ID if that is not unique. 36 # * $itemSymOrIDEnc: quoted version for URLs or attributes. 37 # * $name: reduced name of the item. 38 # * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used). 39 40 doc.item = """ 41 <dt id="$itemSym"><a name="$itemSymOrID"></a><pre>$header</pre></dt> 42 <dd> 43 $desc 44 $seeSrc 45 </dd> 46 """ 47 48 # Chunk of HTML emitted for each entry in the HTML table of contents. 49 # See doc.item for available substitution variables. 50 doc.item.toc = """ 51 <li><a class="reference" href="#$itemSymOrIDEnc" 52 title="$header_plain">$name</a></li> 53 """ 54 55 # HTML rendered for doc.item's seeSrc variable. Note that this will render to 56 # the empty string if you don't pass anything through --docSeeSrcURL. Available 57 # substitutaion variables here are: 58 # * $path: relative path to the file being processed. 59 # * $line: line of the item in the original source file. 60 # * $url: whatever you did pass through the --docSeeSrcUrl switch (which also 61 # gets variables path/line replaced!) 62 doc.item.seesrc = """ <a 63 href="${url}/${path}#L${line}" 64 class="link-seesrc" target="_blank">Source</a>""" 65 66 doc.toc = """ 67 <ul class="simple simple-toc" id="toc-list"> 68 $content 69 </ul> 70 """ 71 72 doc.body_toc = """ 73 <div class="row"> 74 <div class="three columns"> 75 $tableofcontents 76 </div> 77 <div class="nine columns" id="content"> 78 <p class="module-desc">$moduledesc</p> 79 $content 80 </div> 81 </div> 82 """ 83 84 doc.body_no_toc = """ 85 $moduledesc 86 $content 87 """ 88 89 doc.listing_start = "<pre class = \"listing\">" 90 doc.listing_end = "</pre>" 91 92 doc.file = """ 93 <!DOCTYPE html> 94 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 95 <head> 96 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 97 <title>NimYAML - $title</title> 98 99 <link href="/docutils.css" rel="stylesheet" type="text/css"/> 100 <link href="/style.css" rel="stylesheet" type="text/css"/> 101 102 <link href='http://fonts.googleapis.com/css?family=Raleway:400,600,900' rel='stylesheet' type='text/css'/> 103 <link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/> 104 </head> 105 <body> 106 <header> 107 <a class="pagetitle" href="/index.html">NimYAML</a></span> 108 <span><a href="/index.html">Home</a></span> 109 <span><a href="/testing.html">Testing Ground</a></span> 110 <span>Docs:</span> 111 <a href="/api.html">Overview</a> 112 <span> 113 <a href="/serialization.html">Serialization</a> 114 <ul> 115 <li><a href="/serialization.html">Overview</a></li> 116 <li><a href="/schema.html">Schema</a></li> 117 </ul> 118 </span> 119 <span> 120 <a href="/api/yaml.html">Modules</a> 121 <ul class="monospace"> 122 <li><a href="/api/yaml.html">yaml</a></li> 123 <li><a href="/api/yaml/annotations.html">yaml/annotations</a></li> 124 <li><a href="/api/yaml/data.html">yaml/data</a></li> 125 <li><a href="/api/yaml/dom.html">yaml/dom</a></li> 126 <li><a href="/api/yaml/dumping.html">yaml/dumping</a></li> 127 <li><a href="/api/yaml/hints.html">yaml/hints</a></li> 128 <li><a href="/api/yaml/loading.html">yaml/loading</a></li> 129 <li><a href="/api/yaml/native.html">yaml/native</a></li> 130 <li><a href="/api/yaml/parser.html">yaml/parser</a></li> 131 <li><a href="/api/yaml/presenter.html">yaml/presenter</a></li> 132 <li><a href="/api/yaml/stream.html">yaml/stream</a></li> 133 <li><a href="/api/yaml/style.html">yaml/style</a></li> 134 <li><a href="/api/yaml/taglib.html">yaml/taglib</a></li> 135 <li><a href="/api/yaml/tojson.html">yaml/tojson</a></li> 136 </ul> 137 </span> 138 <span> 139 <a href="/migrating.html">NimYAML 2.x</a> 140 </span> 141 <span class="space"></span> 142 <span> 143 <a href="https://github.com/flyx/NimYAML"> 144 <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 145 </a> 146 </span> 147 </header> 148 <article id="documentId"> 149 <div class="container"> 150 <h1 class="title">$title</h1> 151 $content 152 <div class="row"> 153 <div class="twelve-columns footer"> 154 <span class="nim-sprite"></span> 155 <br/> 156 <small>Made with Nim.</small> 157 </div> 158 </div> 159 </div> 160 </article> 161 </body> 162 </html> 163 """