cutting-room-floor / documentation-theme-default Goto Github PK
View Code? Open in Web Editor NEWdefault theme for documentation
default theme for documentation
Trying to implement meta tag support was the final thing here, I just don't buy it. Switch to ejs or such.
This software should not rely on the internet.
Downstream: documentationjs/documentation#260
Now that this will be a module with actual logic, there should be proper tests.
Is there any reason not to add anchors for all heading levels? The code now adds them only to h3 headings: site.js, line 5
I was trying to create a link to a h2 heading in a block of markdown, and discovered this.
I guess the generated html uses only h3 headings, but it would be nice to accommodate github-style markdown links to headings, where other heading levels might be present. Something like anchors.add('h1, h2, h3, h4, h5, h6');
in site.js?
i plan to change my project to export docs to json so that i can drop the json in my github site and render a template with twig.js
using this default theme, but now i am stuck at the file section.hbs
i can't understand how handlebars work, i was hoping you would clear it up for me:
<section class='py2 clearfix'>
<h2 id='{{permalink}}' class='mt0'>
{{name}}<span class='gray'>{{format_params}}</span>
</h2>
{{#if augments}}
<p>
Extends
{{#augments}}
{{autolink name}}
{{/augments}}
</p>
{{/if}}
{{#if context.github}}
<p><a href='{{context.github}}'><code>{{context.path}}</code></a></p>
{{/if}}
{{#if version }}<div>Version: {{version}}</div>{{/if}}
{{#if license }}<div>License: {{license}}</div>{{/if}}
{{#if author }}<div>Author: {{author}}</div>{{/if}}
{{#if copyright }}<div>Copyright: {{copyright}}</div>{{/if}}
{{#if since }}<div>Since: {{since}}</div>{{/if}}
{{md description}}
{{#if params}}
<h4>Parameters</h4>
<ul class='suppress-p-margin'>
{{#params}}
<li>{{format_type type}} <strong>{{name}}</strong>
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
:
<div class='force-inline'>
{{md description}}
</div>
{{#if properties}}
<ul>
{{#properties}}
<li>{{format_type type}} {{name}}
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
{{md description}}</li>
{{/properties}}
</ul>
{{/if}}
</li>
{{/params}}
</ul>
{{/if}}
{{#if properties}}
<h4>Properties</h4>
<ul class='suppress-p-margin'>
{{#properties}}
<li>{{format_type type}} <strong>{{name}}</strong>
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
{{#description}}
:
<div class='force-inline'>
{{md .}}
</div>
{{/description}}
</li>
{{#if properties}}
<ul>
{{#properties}}
<li><code>{{name}}</code> {{format_type type}}
{{#default}}
(default <code>{{.}}</code>)
{{/default}}
{{md description}}</li>
{{/properties}}
</ul>
{{/if}}
{{/properties}}
</li>
{{/if}}
{{#if returns}}
{{#returns}}
<h4>Returns</h4>
<code>{{format_type type}}</code>
{{#if description}}:{{/if}}
<div class='force-inline'>
{{md description}}
</div>
{{/returns}}
{{/if}}
{{#if throws}}
<h4>Throws</h4>
<ul>
{{#throws}}
<li>{{format_type type}}: <div class='force-inline'>{{md description}}</div></li>
{{/throws}}
</ul>
{{/if}}
{{#if examples}}
<h4>Examples</h4>
{{#each examples ~}}
{{#if caption}}<p>{{md caption}}</p>{{/if}}
<pre class='overflow-auto'>{{highlight description}}</pre>
{{/each}}
{{/if}}
{{#if members.static}}
<h4>Static members</h4>
{{#each members.static}}
<div class='collapsible' id='{{permalink}}'>
<a href='#{{permalink}}'>
<code>
.{{name}}<span class='gray'>{{format_params}}</span>
</code>
<div class='force-inline'>
{{md description}}
</div>
</a>
<div class='collapser border px2 m2'>
{{> section}}
</div>
</div>
{{/each}}
{{/if}}
{{#if members.instance}}
<h4>Instance members</h4>
{{#each members.instance}}
<div class='collapsible' id='{{permalink}}'>
<a href='#{{permalink}}'>
<code>
#{{name}}<span class='gray'>{{format_params}}</span>
</code>
<div class='force-inline'>
{{md description}}
</div>
</a>
<div class='collapser border px2'>
{{> section}}
</div>
</div>
{{/each}}
{{/if}}
{{#if events}}
{{#each events}}
<div>
{{> section}}
</div>
{{/each}}
{{/if}}
</section>
can you briefly explain how this works?
@version
http://usejsdoc.org/tags-version.html@since
http://usejsdoc.org/tags-since.html@author
http://usejsdoc.org/tags-author.html@copyright
http://usejsdoc.org/tags-copyright.html@license
http://usejsdoc.org/tags-license.htmlI just added these to core, we should add them here too. Refs documentationjs/documentation#9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.