[pluginlist-update] Displaying all lists of plugins in the same way, using the same macro. This caused an increase in build time, but has a better finished product.

This commit is contained in:
Joseph Nix 2018-05-12 11:59:57 -05:00
parent 9c552bdb58
commit 41bfe68edd
5 changed files with 11 additions and 14 deletions

View File

@ -7,10 +7,10 @@ body:
#### text-block ####
text:
Lektor is a young project but it has a growing list of both official and community supported plugins. Official plugins were developed by the authors of Lektor and kept in good shape together with the rest of the project. Community plugins are moderated and updated regularly, but they might not keep pace with development on Lektor. They are maintained by the community. Install them with `lektor plugins add NAME`.
This is a list of currently known plugins. Official plugins are prefixed with as asterisk (*) and are listed first in each section and separated by an underline.
Lektor is a young project but it has a growing list of both official and community supported plugins. Official plugins are maintained by Lektor and kept in good shape together with the rest of the project. Community plugins are moderated and updated regularly, but they might not keep pace with development on Lektor. They are maintained by the community. Install them with `lektor plugins add NAME`.
If you want to make or publish your own plugin, or see our [docs :ref](/docs/plugins).
(*) Asterisks denote official plugins.
----
class: default

View File

@ -7,9 +7,9 @@
</ul>
{% endmacro %}
{% macro render_plugin_list(category) %}
{% macro render_plugin_list(query) %}
<ul>
{% for plugin in category.children.order_by('-official', 'name') %}
{% for plugin in query.order_by('-official', 'name') %}
{% set pd = project_data(plugin.name) %}
{% if plugin.summary %}
{% set summary = plugin.summary %}

View File

@ -4,5 +4,5 @@
<h1>{{ this.title }}</h1>
{% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %}
{% endcall %}
{{ render_plugin_list(this) }}
{{ render_plugin_list(this.children) }}
{% endblock %}

View File

@ -1,4 +1,5 @@
{% extends "plugins.html" %}
{% from "macros/plugins.html" import render_plugin_list %}
{% block body %}
<h1>Tag: {{ this.tag }}</h1>
@ -23,11 +24,7 @@
{% endfor %}
<h2>Plugins:</h2>
<ul>
{% for plugin in this.items %}
<li>
<a href="{{ plugin|url }}">{{ plugin._id }}</a>
</li>
{% endfor %}
</ul>
<div class="plugin">
{{ render_plugin_list(this.items) }}
</div>
{% endblock %}

View File

@ -18,7 +18,7 @@
{% for category in site.query('/plugin-categories').order_by('title') %}
<h2><a href="{{ category|url }}">{{ category.title }}</a></h2>
<div class="plugin">
{{ render_plugin_list(category) }}
{{ render_plugin_list(category.children) }}
</div>
{% endfor %}
{% endblock %}