mapviz/docs/plugins.md
Jerry Towler 1cb4214f06
Move plugins to separate pages (#688)
* Move plugins to separate pages

Plugins now have their own pages. This will help with search;
previously, searching for anything just found the giant plugins page,
but not which plugin on that page. Now it will find the exact right
page.

The main plugin page lists them in a table with links to the individual
pages. First column is plugin name (and link); second is plugin
description. We may eventually need a short description and a long
description. Unfortunately, getting the newlines right to create the
table in Markdown with column headers was too hard, so the table is in
raw HTML with Liquid variables. As a result, the plugin name and
description have to be re-`markdownify`'d, which adds a `<p>` tag that
then requires removing. So this code gets ugly, but the output is
correct.

Each plugin page has the title, an image (if available), and a table of
parameters. The table looked nic

Each element of the `plugins` collection has its parent set to `Plugins`
to create the breadcrumbs at the top of each page. To pull this off
correctly, we also needed to change each plugin's `name` attribute to be
the `title` attribute, because Liquid cannot programmatically set front
matter, so we need to do it ourselves. If we need a name that is not the
title later, we can add `name` back in.

* Show plugin name again

Previous commit changed plugin `name` to `title`, but didn't update this
instance.

Co-authored-by: Jerry Towler <jtowler@swri.org>
2020-06-01 14:04:01 -05:00

629 B

layout title nav_order has_children
default Plugins 2 true

Plugins

{: .no_toc }

{% for plugin in site.plugins %} {%- comment -%} {%- if plugin.image and plugin.image != "" -%} ![]({{ site.baseurl | append: '/assets/images/' }}{{ plugin.image }}) {%- endif -%} {%- endcomment -%} {%- endfor -%}
Plugin Name Description
{{ plugin.title | markdownify | remove: '

' | remove: '

' }}
{{ plugin.description | markdownify | remove: '

' | remove: '

' }}