From 13a290aff512825dd5621428bc028a6d51e97416 Mon Sep 17 00:00:00 2001 From: Joseph Nix Date: Sat, 5 May 2018 01:34:17 -0500 Subject: [PATCH] [pluginlist-update] Basically finishing tags templates, tweaking other plugin templates, starting to add content, tweaking content in plugin docs pages. --- content/docs/plugins/contents.lr | 29 ++++++++++--------- content/plugin-categories/build/contents.lr | 6 +++- content/plugin-categories/content/contents.lr | 2 +- content/plugin-categories/contents.lr | 9 ++++++ content/plugin-categories/deploy/contents.lr | 2 +- .../plugin-categories/templates/contents.lr | 2 +- content/plugins/contents.lr | 2 +- models/plugin-categories.ini | 3 +- templates/plugin-categories.html | 16 +++++++--- templates/plugin-tag.html | 28 +++++++++++++++--- templates/plugin.html | 2 +- 11 files changed, 73 insertions(+), 28 deletions(-) diff --git a/content/docs/plugins/contents.lr b/content/docs/plugins/contents.lr index cac8bba0..9669d13b 100644 --- a/content/docs/plugins/contents.lr +++ b/content/docs/plugins/contents.lr @@ -10,19 +10,9 @@ Lektor can be extended through the use of plugins. This is something that can be done on a per-project basis. This gives a quick overview of how to use plugins and how to build your own. -## Loading Plugins - -Plugins can be added to a Lektor project in two different ways: - -1. Plugins can be added to the `[packages]` section of the project. In that - case Lektor will automatically download and enable the plugin next time - you build the project or run the server. -2. Plugins can be added to the `packages/` folder in your project. Each - plugin has to go into a separate folder. This method is especially useful - for project specific plugins or for plugin development. - -## Installing Plugins +## Installing Published Plugins +Lektor can find and install plugins that have been published to [PyPI :ext](https://pypi.org/) fo you. For completely automated plugin management just open your project file in a text editor and edit or extend the `[packages]` section. Just add a line for each plugin in the form `name = version`: @@ -34,7 +24,20 @@ lektor-other-plugin = 1.2 ``` It's also possible to use the [plugins add :ref](../cli/plugins/add/) command -to automatically add the latest version of a plugin to the project file. +`lektor plugin add NAME` to automatically add the latest version of a plugin +to the project file. To upgrade a plugin just increase the version number to the release you want and Lektor will do the rest. + +## Loading Plugins + +Plugins can be added to a Lektor project in two different ways: + +1. Plugins can be added to the `[packages]` section of the project. In that + case Lektor will automatically download and enable the plugin next time + you build the project or run the server. This can be accomplished for you + with the automatic install above, or it can be done manually. +2. Plugins can be added to the `packages/` folder in your project. Each + plugin has to go into a separate folder. This method is especially useful + for project specific plugins or for plugin development. diff --git a/content/plugin-categories/build/contents.lr b/content/plugin-categories/build/contents.lr index ae5472d0..86f94409 100644 --- a/content/plugin-categories/build/contents.lr +++ b/content/plugin-categories/build/contents.lr @@ -1,8 +1,12 @@ body: #### text-block #### -text: par +text: These plugins primarily deal with Lektor's build process, adding build tools or processes. ---- class: default --- title: Build +--- +_discoverable: yes +--- +_hidden: no diff --git a/content/plugin-categories/content/contents.lr b/content/plugin-categories/content/contents.lr index 84dc16b2..12b7ee05 100644 --- a/content/plugin-categories/content/contents.lr +++ b/content/plugin-categories/content/contents.lr @@ -3,6 +3,6 @@ title: Content body: #### text-block #### -text: adsf +text: These plugins primarily deal with adding or modifying available content in Lektor. ---- class: default diff --git a/content/plugin-categories/contents.lr b/content/plugin-categories/contents.lr index 8a35b461..6b1cccef 100644 --- a/content/plugin-categories/contents.lr +++ b/content/plugin-categories/contents.lr @@ -1,3 +1,12 @@ _model: plugin-categories --- _slug: plugins/categories +--- +body: + +#### text-block #### +text: estate +---- +class: default +--- +title: Plugin Categories diff --git a/content/plugin-categories/deploy/contents.lr b/content/plugin-categories/deploy/contents.lr index 27ea37bf..2998822d 100644 --- a/content/plugin-categories/deploy/contents.lr +++ b/content/plugin-categories/deploy/contents.lr @@ -1,7 +1,7 @@ body: #### text-block #### -text: ds +text: These plugins primarily deal with Lektor's deployment abilities. They may add a deployment service or location. ---- class: default --- diff --git a/content/plugin-categories/templates/contents.lr b/content/plugin-categories/templates/contents.lr index 7335f309..030fbbd2 100644 --- a/content/plugin-categories/templates/contents.lr +++ b/content/plugin-categories/templates/contents.lr @@ -1,7 +1,7 @@ body: #### text-block #### -text: saf +text: These plugins primarily deal with Lektor's [Templates :ref](/docs/templates/). They may add or modify [context :ref](docs/templates/#template-context), filters, api, globals, modify images, change navigation, or many other functionalities available to templates. ---- class: default --- diff --git a/content/plugins/contents.lr b/content/plugins/contents.lr index ae969c66..3be5ac2f 100644 --- a/content/plugins/contents.lr +++ b/content/plugins/contents.lr @@ -7,7 +7,7 @@ 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. +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. diff --git a/models/plugin-categories.ini b/models/plugin-categories.ini index c9b4a1ae..1ef049cf 100644 --- a/models/plugin-categories.ini +++ b/models/plugin-categories.ini @@ -1,6 +1,7 @@ [model] name = Plugin Categories -label = Plugin Categories +inherits = page +label = {{ this.name }} hidden = yes protected = yes diff --git a/templates/plugin-categories.html b/templates/plugin-categories.html index e8c3687b..8a49a580 100644 --- a/templates/plugin-categories.html +++ b/templates/plugin-categories.html @@ -1,7 +1,15 @@ -{% extends "layout.html" %} +{% extends "plugins.html" %} {% from "macros/plugins.html" import render_category_nav %} -{% block title %}Plugin Categories{% endblock %} + {% block body %} -

Plugin Categories

- {{ render_category_nav(active=none) }} +

{{ this.title }}

+ {% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %} + {% endcall %} + {% endblock %} diff --git a/templates/plugin-tag.html b/templates/plugin-tag.html index 13c40220..4dfd38d0 100644 --- a/templates/plugin-tag.html +++ b/templates/plugin-tag.html @@ -2,12 +2,32 @@ {% block body %}

Tag: {{ this.tag }}

+ + {% for event in site.get('/docs/api/plugins/events').children.all() %} + {% if this.tag == event.title %} +

+ This is an event emitted by Lektor for plugins to hook. + The following plugins hook this event. + Take a look at their source code to see how they work! +

+

+ Intro to Plugins + || + Plugin Commands + || + Plugin API + || + This Event +

+ {% endif %} + {% endfor %} +

Plugins:

{% endblock %} diff --git a/templates/plugin.html b/templates/plugin.html index 7f4efb03..306b660d 100644 --- a/templates/plugin.html +++ b/templates/plugin.html @@ -60,7 +60,7 @@

Tags

{% if this.tags %} - {% for t in this.tags -%} + {% for t in this.tags %} {{ "and " if loop.last }} {{ t }}{{ ", " if not loop.last }} {% endfor %}