Peter Bacon Darwin 9c55afdfde fix(api-builder): pass versionInfo to macros
The update to dgeni-packages led to a breaking change in the Nunjucks
templates, where macros are now isolated from their calling site.

This means that we must pass the `versionInfo` object through to the
macro rather than expecting it to be in scope already.
2016-09-14 07:39:06 -07:00

19 lines
566 B
HTML

{% import "lib/githubLinks.html" as github -%}
{% extends 'layout/base.template.html' %}
{% block body %}
<h1 class="id">{$ doc.id $} <span class="type">module</span></h1>
<p>defined in {$ github.githubViewLink(doc, versionInfo) $}</p>
<p>{$ doc.description | marked $}</p>
{% if doc.exports.length %}
<h2>Exports</h2>
<ul>
{%- for exportDoc in doc.exports %}
{% if not exportDoc.internal -%}
<li><a href="{$ exportDoc.path $}"><strong>{$ exportDoc.name $}</strong> {$ exportDoc.docType $}</a></li>
{%- endif %}
{%- endfor %}
</ul>
{% endif %}
{% endblock %}