Skip to content
Browse files

moved some stuff into samples, expanding on a bit more of jodoc in th…

…e docs
  • Loading branch information...
1 parent 42b02a1 commit 2d3e1082dc486f47a884c6aeaf8d8795946dfd02 Daniel Freedman committed Jul 12, 2010
View
2 README.mdown
@@ -166,5 +166,5 @@ Defining a table of contents structure:
Building joDoc's documentation with joDoc:
- jodoc --output html -s --toc TOC_SAMPLE.md *.mdown && cp css/* html/ && cp index.html html/
+ jodoc --output html -s --toc samples/TOC_SAMPLE.mdown *.mdown && cp samples/css/* html/ && cp samples/index.html html/
View
40 TEMPLATE.mdown
@@ -0,0 +1,40 @@
+HTML Template
+=============
+
+joDoc allows for setting an HTML template to wrap around the text from the markdown blocks.
+
+Variables
+---------
+
+Currently, the only variables supported in the HTML template are `$body` and `$title`.
+
+The `$body` tag will be replaced with the body of the HTML output, and `$title` will be replaced with whatever
+
+is given to the `--title` option for joDoc, or "JoDoc" by default.
+
+By default, a "non-terrible" template is used, linking to the css stylesheets in the `samples/css` folder.
+
+Examples
+--------
+
+A simple example of a joDoc compatible template can be found in `samples/template.html`.
+
+ <html><head><title>$title</title></head><body>$body</body></html>
+
+The default template of joDoc is a little more advanced, and depends on `doc.css` and `docbody.css`, which can be found in `samples/css/`.
+
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+ <html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>$title</title>
+ <meta name="generator" content="joDoc">
+ <link rel="stylesheet" type="text/css" href="docbody.css">
+ <link rel="stylesheet" type="text/css" href="doc.css">
+ <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width">
+ <meta name="format-detection" content="false">
+ </head>
+ <body>
+ $body
+ </body>
+ </html>
View
5 TOC.mdown
@@ -45,3 +45,8 @@ Munging
joDoc uses path name munging to root output HTML documents in a directory without accidentally overwriting files.
Because of this, it may be hard to embed direct links into the Table of Contents file. Everything works much better if you just leave it to the autolinker.
+
+Example
+-------
+
+A good example of how to write a table of contents for joDoc can be found in `samples/TOC_SAMPLE.mdown`
View
3 TOC_SAMPLE.md → samples/TOC_SAMPLE.mdown
@@ -13,7 +13,8 @@ joDoc Documentation
- {ABOUT.mdown}
- {README.mdown}
-- {css/}
+- {TEMPLATE.mdown}
+- {TOC.mdown}
- License
[Keyword Index](./_index.html)
View
0 css/doc.css → samples/css/doc.css
File renamed without changes.
View
0 css/docbody.css → samples/css/docbody.css
File renamed without changes.
View
0 index.html → samples/index.html
File renamed without changes.
View
2 samples/template.html
@@ -0,0 +1,2 @@
+<!-- Just a really simple one line "sample" for a joDoc compatible template -->
+<html><head><title>$title</title></head><body>$body</body></html>

0 comments on commit 2d3e108

Please sign in to comment.
Something went wrong with that request. Please try again.