Modify jsdoc-template to write jekyll-compatible files.
This commit is contained in:
parent
138c5081e9
commit
abd020556f
|
@ -1,56 +1,48 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
layout: default
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
title: "API - File Index"
|
||||||
<head>
|
---
|
||||||
<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
|
|
||||||
{! Link.base = ""; /* all generated links will be relative to this */ !}
|
{! Link.base = ""; /* all generated links will be relative to this */ !}
|
||||||
<title>JsDoc Reference - File Index</title>
|
<style type="text/css">
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
{+include("static/default.css")+}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="index">
|
||||||
|
{+publish.classesIndex+}
|
||||||
|
</div>
|
||||||
|
|
||||||
<style type="text/css">
|
<div id="content">
|
||||||
{+include("static/default.css")+}
|
<h1 class="classTitle">File Index</h1>
|
||||||
</style>
|
|
||||||
</head>
|
<for each="item" in="data">
|
||||||
|
<div>
|
||||||
<body>
|
<h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
|
||||||
{+include("static/header.html")+}
|
<if test="item.desc">{+resolveLinks(summarize(item.desc))+}</if>
|
||||||
|
<dl>
|
||||||
<div id="index">
|
<if test="item.author">
|
||||||
{+publish.classesIndex+}
|
<dt class="heading">Author:</dt>
|
||||||
</div>
|
<dd>{+item.author+}</dd>
|
||||||
|
</if>
|
||||||
<div id="content">
|
<if test="item.version">
|
||||||
<h1 class="classTitle">File Index</h1>
|
<dt class="heading">Version:</dt>
|
||||||
|
<dd>{+item.version+}</dd>
|
||||||
<for each="item" in="data">
|
</if>
|
||||||
<div>
|
{! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !}
|
||||||
<h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
|
<if test="locations.length">
|
||||||
<if test="item.desc">{+resolveLinks(summarize(item.desc))+}</if>
|
<dt class="heading">Location:</dt>
|
||||||
<dl>
|
<for each="location" in="locations">
|
||||||
<if test="item.author">
|
<dd><a href="{+location+}">{+location+}</a></dd>
|
||||||
<dt class="heading">Author:</dt>
|
</for>
|
||||||
<dd>{+item.author+}</dd>
|
</if>
|
||||||
</if>
|
</dl>
|
||||||
<if test="item.version">
|
</div>
|
||||||
<dt class="heading">Version:</dt>
|
<hr />
|
||||||
<dd>{+item.version+}</dd>
|
</for>
|
||||||
</if>
|
|
||||||
{! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !}
|
</div>
|
||||||
<if test="locations.length">
|
|
||||||
<dt class="heading">Location:</dt>
|
<div class="fineprint" style="clear:both">
|
||||||
<for each="location" in="locations">
|
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
||||||
<dd><a href="{+location+}">{+location+}</a></dd>
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
||||||
</for>
|
</div>
|
||||||
</if>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
</for>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,15 +1,12 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
layout: default
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
title: "API - {+data.alias+}"
|
||||||
<head>
|
---
|
||||||
<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
|
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
|
||||||
{! Link.base = "../"; /* all generated links will be relative to this */ !}
|
|
||||||
<title>JsDoc Reference - {+data.alias+}</title>
|
|
||||||
|
|
||||||
<style type="text/css">
|
{! Link.base = "../"; /* all generated links will be relative to this */ !}
|
||||||
{+include("static/default.css")+}
|
<style type="text/css">
|
||||||
</style>
|
{+include("static/default.css")+}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -1,39 +1,30 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
---
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
layout: default
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
title: "API - Index"
|
||||||
<head>
|
---
|
||||||
<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
|
|
||||||
|
<style type="text/css">
|
||||||
<title>JsDoc Reference - Index</title>
|
{+include("static/default.css")+}
|
||||||
<meta name="generator" content="JsDoc Toolkit" />
|
</style>
|
||||||
|
|
||||||
<style type="text/css">
|
<div id="index">
|
||||||
{+include("static/default.css")+}
|
{+publish.classesIndex+}
|
||||||
</style>
|
</div>
|
||||||
</head>
|
|
||||||
|
<div id="content">
|
||||||
<body>
|
<h1 class="classTitle">Class Index</h1>
|
||||||
{+include("static/header.html")+}
|
|
||||||
|
<for each="thisClass" in="data">
|
||||||
<div id="index">
|
<div>
|
||||||
{+publish.classesIndex+}
|
<h2>{+(new Link().toSymbol(thisClass.alias))+}</h2>
|
||||||
</div>
|
{+resolveLinks(summarize(thisClass.classDesc))+}
|
||||||
|
</div>
|
||||||
<div id="content">
|
<hr />
|
||||||
<h1 class="classTitle">Class Index</h1>
|
</for>
|
||||||
|
|
||||||
<for each="thisClass" in="data">
|
</div>
|
||||||
<div>
|
|
||||||
<h2>{+(new Link().toSymbol(thisClass.alias))+}</h2>
|
<div class="fineprint" style="clear:both">
|
||||||
{+resolveLinks(summarize(thisClass.classDesc))+}
|
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
||||||
</div>
|
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
||||||
<hr />
|
</div>
|
||||||
</for>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="fineprint" style="clear:both">
|
|
||||||
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
|
||||||
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -64,7 +64,7 @@ function publish(symbolSet) {
|
||||||
var output = "";
|
var output = "";
|
||||||
output = classTemplate.process(symbol);
|
output = classTemplate.process(symbol);
|
||||||
|
|
||||||
IO.saveFile(publish.conf.outDir+"symbols/", symbol.alias+publish.conf.ext, output);
|
IO.saveFile(publish.conf.outDir+"symbols/", symbol.alias+publish.conf.ext+".md", output);
|
||||||
}
|
}
|
||||||
|
|
||||||
// regenerate the index with different relative links, used in the index pages
|
// regenerate the index with different relative links, used in the index pages
|
||||||
|
@ -78,7 +78,7 @@ function publish(symbolSet) {
|
||||||
catch(e) { print(e.message); quit(); }
|
catch(e) { print(e.message); quit(); }
|
||||||
|
|
||||||
var classesIndex = classesindexTemplate.process(classes);
|
var classesIndex = classesindexTemplate.process(classes);
|
||||||
IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex);
|
IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext+".md", classesIndex);
|
||||||
classesindexTemplate = classesIndex = classes = null;
|
classesindexTemplate = classesIndex = classes = null;
|
||||||
|
|
||||||
// create the file index page
|
// create the file index page
|
||||||
|
@ -103,7 +103,7 @@ function publish(symbolSet) {
|
||||||
|
|
||||||
// output the file index page
|
// output the file index page
|
||||||
var filesIndex = fileindexTemplate.process(allFiles);
|
var filesIndex = fileindexTemplate.process(allFiles);
|
||||||
IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex);
|
IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext+".md", filesIndex);
|
||||||
fileindexTemplate = filesIndex = files = null;
|
fileindexTemplate = filesIndex = files = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ function makeSrcFile(path, srcDir, name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (src.hilited) {
|
if (src.hilited) {
|
||||||
IO.saveFile(srcDir, name+publish.conf.ext, src.hilited);
|
IO.saveFile(srcDir, name+publish.conf.ext+".md", src.hilited);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
pages
2
pages
|
@ -1 +1 @@
|
||||||
Subproject commit 9ef772465fe1af3d1a75a7bd30558594686f02cc
|
Subproject commit fef4a2da3c808762d5c54a6dbd4e65951712468d
|
Loading…
Reference in New Issue