chore(dgeni): add beta tag support

This commit is contained in:
perry 2017-01-09 13:59:03 -06:00
parent 92e0bb55c3
commit 77d6308bca
3 changed files with 13 additions and 2 deletions

View File

@ -20,7 +20,9 @@ module.exports = function jekyll(renderDocsProcessor) {
doc.outputPath = doc.outputPath.toLowerCase().replace(' ', '-');
docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/')
.replace('/index.md', '')
.replace('content/','');
.replace('content/', '');
docs[i].demo = !!docs[i].demo;
});
docs.push({

View File

@ -1,6 +1,10 @@
module.exports = [
{'name': 'advanced'},
{'name': 'demo'},
{'name': 'beta', transforms: function(doc, tag, value) {
// make the value true or undefined instead of '' or undefined
return typeof value !== 'undefined';
}},
{'name': 'usage'},
{'name': 'classes'}, // related classes
{'name': 'interfaces'} // related interfaces

View File

@ -1,4 +1,9 @@
<@ for doc in docs @><@ if doc.URL and doc.private != true @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $></a>
</li><@ endif @><@ endfor @>
<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|replace(' ','-') $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $> <span class="beta">&beta;</span></a>
</li><@ endif @><@ endfor @>