forked from tildeverse/rfcs
22 lines
763 B
HTML
22 lines
763 B
HTML
{% macro from(name, max=0) %}
|
|
{% set s = get_section(path=name ~ "/_index.md") %}
|
|
{{ self::from_section(s=s, max=max) }}
|
|
{% endmacro %}
|
|
|
|
{% macro from_pages(pages, max=0) %}
|
|
{% set list = pages|reverse %}
|
|
{% if max %}{% set list = list|slice(start=0, end=max) %}{% endif %}
|
|
<ul>
|
|
{% for rfc in list %}
|
|
{% set base_path = rfc.components | join(sep="/") %}
|
|
<li><a href="{{ get_url(path="@/" ~ base_path ~ ".md") }}">{% if rfc.extra.number is defined %}RFC {{ rfc.extra.number }}:{% else %}DRAFT:{% endif %} {{ rfc.title }}</a></li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endmacro %}
|
|
|
|
{% macro from_section(s, max=0) %}
|
|
{% if s and s.pages|length > 0 %}
|
|
{{ self::from_pages(pages=s.pages, max=max) }}
|
|
{% endif %}
|
|
{% endmacro %}
|