You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

themes.htm 7.6 kB

10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!-->
  4. <html class="no-js" lang="en">
  5. <!--<![endif]-->
  6. <head>
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  10. <title>Themes - DocNet Documentation</title>
  11. <link rel="shortcut icon" href="favicon.ico">
  12. <link rel="stylesheet" href="css/theme.css" type="text/css" />
  13. <link rel="stylesheet" href="css/theme_colors.css" type="text/css" />
  14. <link rel="stylesheet" href="css/styles/vs.css">
  15. <link rel="stylesheet" href="css/font-awesome.4.5.0.min.css">
  16. </head>
  17. <body role="document">
  18. <div class="grid-for-nav">
  19. <nav data-toggle="nav-shift" class="nav-side stickynav">
  20. <div class="side-nav-search">
  21. <a href="index.htm"><i class="fa fa-home"></i> DocNet Documentation</a>
  22. <div role="search">
  23. <form id="search-form" class="form" action="Docnet_search.htm" method="get">
  24. <input type="text" name="q" placeholder="Search docs" />
  25. </form>
  26. </div>
  27. </div>
  28. <div class="menu menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  29. <ul>
  30. <li class="tocentry"><a href="index.htm">Home</a>
  31. </li>
  32. <li class="tocentry"><a href="usage.htm">Usage</a>
  33. </li>
  34. <li class="tocentry">
  35. <span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="Configuration.htm">Configuration</a></span>
  36. </li>
  37. <li class="tocentry">
  38. <ul>
  39. <li><span class="navigationgroup"><i class="fa fa-caret-down"></i> <a href="Authoringcontent.htm">Authoring content</a></span></li>
  40. <li class="tocentry current"><a class="current" href="themes.htm">Themes</a>
  41. <ul class="currentrelative">
  42. <li class="tocentry"><a href="#Themesfolder">Themes folder</a></li>
  43. <li class="tocentry"><a href="#Defaulttheme">Default theme</a></li>
  44. <li class="tocentry"><a href="#PageTemplatehtm">PageTemplate.htm</a></li>
  45. </ul>
  46. <li class="tocentry">
  47. <span class="navigationgroup"><i class="fa fa-caret-right"></i> <a href="WritingcontentusingMarkdown.htm">Writing content using Markdown</a></span>
  48. </li>
  49. </ul>
  50. </li>
  51. <li class="tocentry"><a href="search.htm">Search</a>
  52. </li>
  53. <li class="tocentry"><a href="acknowledgements.htm">Acknowledgements</a>
  54. </li>
  55. <li class="tocentry"><a href="license.htm">License</a>
  56. </li>
  57. </ul>
  58. <div class="toc-footer">
  59. <span class="text-small">
  60. <hr/>
  61. <a href="https://github.com/FransBouma/DocNet" target="_blank">Made with <i class="fa fa-github"></i> DocNet</a>
  62. </span>
  63. </div>
  64. </div>
  65. &nbsp;
  66. </nav>
  67. <section data-toggle="nav-shift" class="nav-content-wrap">
  68. <nav class="nav-top" role="navigation" aria-label="top navigation">
  69. <i data-toggle="nav-top" class="fa fa-bars"></i>
  70. <a href="index.htm">DocNet Documentation</a>
  71. </nav>
  72. <div class="nav-content">
  73. <div role="navigation" aria-label="breadcrumbs navigation">
  74. <div class="breadcrumbs">
  75. <ul><li><a href="index.htm">Home</a></li> / <li><a href="Authoringcontent.htm">Authoring content</a></li> / <li><a href="themes.htm">Themes</a></li></ul>
  76. </div>
  77. <hr />
  78. </div>
  79. <div role="main">
  80. <div class="section">
  81. <p><h1>Themes</h1></p>
  82. <p><code>Docnet</code> uses themes to produce output in a certain form. A theme is a folder within the <code>Themes</code> folder which contains a <code>PageTemplate.htm</code> file and a <code>Destination</code> folder which contains zero or more folders and files which have to be copied to the <code>Destination</code> folder specified in the <code>docnet.json</code> file. </p>
  83. <p><a name="Themesfolder"></a><h2>Themes folder</h2></p>
  84. <p><code>Docnet</code> expects the <code>Themes</code> folder to be located in the folder where the executable is started from. This means that if you build <code>Docnet</code> from source, you have to manually copy the Themes folder to the folder your binary is located. To make development easier, you could create a <code>junction</code> in the bin\debug or bin\release folder to the Themes folder in the source repository, using <code>mklink</code> on a windows command prompt.</p>
  85. <p><a name="Defaulttheme"></a><h2>Default theme</h2></p>
  86. <p>The default theme is called <code>Default</code> and is chosen if no theme has been specified in the <a href="docnetjson.htm">docnet.json</a> file. It is based on the theme from ReadTheDocs, and is created from the one shipped with MkDocs.</p>
  87. <p><a name="PageTemplatehtm"></a><h2>PageTemplate.htm</h2></p>
  88. <p>The <code>PageTemplate.htm</code> file is a simple HTML file, located in each <code>theme</code> folder, which is used as the template for all generated <code>.htm</code> files. You can place whatever you like in there, including references to css/js files, headers, footers etc. DocNet however expects a couple of <em>markers</em> which are replaced with the data created from the markdown files. These markers are described below. The markers have to be specified as-is.</p>
  89. <ul>
  90. <li><code>{{Name}}</code>. This is replaced with the value specified in <code>Name</code> in the <code>docnet.json</code> file.</li>
  91. <li><code>{{Content}}</code>. This is replaced with the HTML generated from the markdown file. </li>
  92. <li><code>{{ToC}}</code>. This is replaced with a <code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;</code> tree built from the names and structure given to pages in <code>Pages</code>.</li>
  93. <li><code>{{TopicTitle}}</code>. This is replaced with the title of the page, which is the value specified as name in the <code>Pages</code> tree. </li>
  94. <li><code>{{Footer}}</code>. This is replaced with the value specified in <code>Footer</code> in the docnet.json file. </li>
  95. <li><code>{{Breadcrumbs}}</code>. This is replaced with a / delimited list of names making up the bread crumbs representing the navigation through the ToC to reach the current page. </li>
  96. <li><code>{{ExtraScript}}</code>. This is replaced with extra script definitions / references required by some pages, like the search page. It's <code>docnet</code> specific and if this marker isn't present, search won't work.</li>
  97. <li><code>{{Path}}</code>. This is used to fill in the relative path to reach css/js files in hard-coded URLs in the <code>PageTemplate</code> file. This means that specifying a css URL in <code>PageTemplate</code> should look like:</li>
  98. </ul>
  99. <p><pre><code class="HTML">&lt;link rel="stylesheet" href="{{Path}}css/theme.css" type="text/css" /&gt;
  100. </code></pre></p>
  101. <p><code>Docnet</code> will then replace <code>{{Path}}</code> with e.g. '../../' to get to the css file from the location of the .htm file loaded.</p>
  102. </div>
  103. </div>
  104. <footer>
  105. <hr />
  106. <div role="contentinfo">
  107. Made with DocNet. Get your copy at: <a href='https://github.com/FransBouma/DocNet' target='_blank'>https://github.com/FransBouma/DocNet</a>.
  108. </div>
  109. </footer>
  110. </div>
  111. </section>
  112. </div>
  113. <script src="js/jquery-2.1.1.min.js"></script>
  114. <script src="js/modernizr-2.8.3.min.js"></script>
  115. <script src="js/highlight.pack.js"></script>
  116. <script src="js/theme.js"></script>
  117. {{ExtraScript}}
  118. </body>
  119. </html>