Merge pull request #265 from lektor/lektor-website-197

Adding a /plugins/tags page and related tweaks
This commit is contained in:
Joseph Nix 2018-12-15 13:04:24 -06:00 committed by GitHub
commit d36e4aac6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 167 additions and 63 deletions

View File

@ -16,4 +16,5 @@ lektor-markdown-header-anchors = 0.1
lektor-markdown-highlighter = 0.1 lektor-markdown-highlighter = 0.1
lektor-markdown-admonition = 0.1 lektor-markdown-admonition = 0.1
lektor-atom = 0.2 lektor-atom = 0.2
lektor-tags = 0.1 lektor-tags = 0.3
lektor-slugify = 0.4

View File

@ -1,2 +1,3 @@
parent = /plugins parent = /plugins
template = plugin-tag.html template = plugin-tag.html
url_path = {{ this.parent.url_path }}tag/{{ tag|slug(lowercase=False) }}

View File

@ -1,9 +1,11 @@
_model: plugin
---
name: lektor-asciidoc name: lektor-asciidoc
--- ---
categories: content categories: content
--- ---
tags: tags:
asciidoc AsciiDoc
field type field type
setup-env setup-env

View File

@ -1,8 +1,10 @@
_model: plugin
---
name: lektor-asciidoctor name: lektor-asciidoctor
--- ---
tags: tags:
asciidoc AsciiDoc
field type field type
setup-env setup-env
--- ---

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-atom name: lektor-atom
--- ---
categories: templates categories: templates

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-bibtex-support name: lektor-bibtex-support
--- ---
categories: content categories: content
@ -5,5 +7,5 @@ categories: content
tags: tags:
setup-env setup-env
jinja globals Jinja globals
LaTeX LaTeX

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-creative-commons name: lektor-creative-commons
--- ---
categories: templates categories: templates
@ -6,10 +8,6 @@ tags:
Creative Commons Creative Commons
Licensing Licensing
jinja globals Jinja globals
multi-language i18n
multilingual
setup-env
translate
translation
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-disqus-comments name: lektor-disqus-comments
--- ---
categories: templates categories: templates

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-github-repos name: lektor-github-repos
--- ---
categories: templates categories: templates

View File

@ -1,10 +1,12 @@
_model: plugin
---
name: lektor-google-analytics name: lektor-google-analytics
--- ---
tags: tags:
analytics analytics
Google Analytics Google Analytics
jinja globals Jinja globals
setup-env setup-env
--- ---
categories: templates categories: templates

View File

@ -1,11 +1,13 @@
_model: plugin
---
name: lektor-gulp name: lektor-gulp
--- ---
categories: build categories: build
--- ---
tags: tags:
html HTML
css CSS
javascript JavaScript
gulp gulp
before-build-all before-build-all
server-stop server-stop

View File

@ -1,11 +1,12 @@
_model: plugin
---
name: lektor-htmlmin name: lektor-htmlmin
--- ---
categories: build categories: build
--- ---
tags: tags:
html HTML
minify minify
htmlmin htmlmin
after-build-all after-build-all

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-i18n name: lektor-i18n
--- ---
categories: build categories: build
@ -6,15 +8,10 @@ summary: Use GetText .PO files to translate your site content.
--- ---
tags: tags:
multilingual
multi-language
language
GetText GetText
translate
translation
alternatives alternatives
i18n i18n
babel Babel
setup-env setup-env
before-build before-build
after-build after-build

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-jinja-content name: lektor-jinja-content
--- ---
categories: content categories: content
@ -5,8 +7,8 @@ categories: content
tags: tags:
process-template-context process-template-context
jinja Jinja
templates templates
content content
context context
markdown Markdown

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-make name: lektor-make
--- ---
categories: build categories: build
@ -6,6 +8,5 @@ tags:
before-build-all before-build-all
make make
makefile
--- ---
summary: Run <code>make lektor</code> for custom build systems. summary: Run <code>make lektor</code> for custom build systems.

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-markdown-admonition name: lektor-markdown-admonition
--- ---
categories: content categories: content
@ -7,6 +9,6 @@ official: yes
tags: tags:
official official
markdown Markdown
admonition admonition
markdown-config markdown-config

View File

@ -1,9 +1,11 @@
_model: plugin
---
name: lektor-markdown-excerpt name: lektor-markdown-excerpt
--- ---
categories: templates categories: templates
--- ---
tags: tags:
markdown Markdown
jinja filters Jinja filters
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-markdown-header-anchors name: lektor-markdown-header-anchors
--- ---
categories: content categories: content
@ -7,7 +9,7 @@ official: yes
tags: tags:
official official
markdown Markdown
headers headers
anchors anchors
table of contents table of contents

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-markdown-highlighter name: lektor-markdown-highlighter
--- ---
categories: content categories: content
@ -7,7 +9,7 @@ official: yes
tags: tags:
official official
markdown Markdown
syntax highlighting syntax highlighting
Pygments Pygments
markdown-config markdown-config

View File

@ -1,14 +1,16 @@
_model: plugin
---
name: lektor-minify name: lektor-minify
--- ---
tags: tags:
django_htmlmin django_htmlmin
rcssmin rCSSmin
rjsmin rJSmin
minify minify
html HTML
css CSS
js JavaScript
setup-env setup-env
after-build after-build
--- ---

View File

@ -1,10 +1,12 @@
_model: plugin
---
name: lektor-natural-language name: lektor-natural-language
--- ---
categories: templates categories: templates
--- ---
tags: tags:
jinja filters Jinja filters
nltk NLTK
natural language natural language
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-netlify name: lektor-netlify
--- ---
categories: deploy categories: deploy

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-nofollow name: lektor-nofollow
--- ---
categories: content categories: content
@ -5,7 +7,7 @@ categories: content
tags: tags:
nofollow links nofollow links
markdown Markdown
markdown-config markdown-config
--- ---
summary: Easily create nofollow links in markdown summary: Easily create nofollow links in Markdown.

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-npm-support name: lektor-npm-support
--- ---
categories: build categories: build
@ -5,11 +7,13 @@ categories: build
tags: tags:
webpack webpack
browserify Browserify
Parcel Parcel
Babel Babel
Sass Sass
yarn Node
npm
Yarn
server-spawn server-spawn
server-stop server-stop
before-build-all before-build-all

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-pythonmarkdown name: lektor-pythonmarkdown
--- ---
allow_comments: yes allow_comments: yes
@ -8,6 +10,6 @@ official: no
--- ---
tags: tags:
markdown Markdown
setup-env setup-env
field type field type

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-read-full-post name: lektor-read-full-post
--- ---
categories: content categories: content
@ -5,8 +7,8 @@ categories: content
tags: tags:
setup-env setup-env
jinja globals Jinja globals
blog blog
markdown Markdown
--- ---
summary: Allows blog listing posts to be shortened with a link to the full post. summary: Allows blog listing posts to be shortened with a link to the full post.

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-root-relative-path name: lektor-root-relative-path
--- ---
categories: templates categories: templates
@ -5,5 +7,5 @@ categories: templates
tags: tags:
navigation navigation
jinja filters Jinja filters
setup-env setup-env

View File

@ -1,10 +1,11 @@
_model: plugin
---
name: lektor-rst name: lektor-rst
--- ---
categories: content categories: content
--- ---
tags: tags:
rst
reStructuredText reStructuredText
field type field type
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-s3 name: lektor-s3
--- ---
categories: deploy categories: deploy
@ -6,7 +8,7 @@ tags:
AWS AWS
S3 S3
Cloudfront CloudFront
publisher publisher
setup-env setup-env
--- ---

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-shortcodes name: lektor-shortcodes
--- ---
categories: templates categories: templates
@ -5,9 +7,9 @@ categories: templates
tags: tags:
shortcodes shortcodes
markdown Markdown
markdown-config markdown-config
jinja filters Jinja filters
setup-env setup-env
--- ---
summary: Allows you to use shortcodes (something like tags) in your model fields. summary: Allows you to use shortcodes (something like tags) in your model fields.

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-slugify name: lektor-slugify
--- ---
categories: templates categories: templates
@ -5,6 +7,6 @@ categories: templates
tags: tags:
slugify slugify
jinja filters Jinja filters
python-slugify python-slugify
setup-env setup-env

View File

@ -1,9 +1,11 @@
_model: plugin
---
name: lektor-strip-html-tags name: lektor-strip-html-tags
--- ---
categories: templates categories: templates
--- ---
tags: tags:
jinja filters Jinja filters
html HTML
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-surge name: lektor-surge
--- ---
categories: deploy categories: deploy

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-tags name: lektor-tags
--- ---
categories: content categories: content

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-thumbnail-generator name: lektor-thumbnail-generator
--- ---
categories: templates categories: templates

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-webdav name: lektor-webdav
--- ---
categories: templates categories: templates
@ -5,8 +7,8 @@ categories: templates
tags: tags:
WebDAV WebDAV
content
remote content remote content
jinja globals Jinja globals
jinja filters Jinja filters
setup-env setup-env

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-webpack-support name: lektor-webpack-support
--- ---
categories: build categories: build
@ -9,9 +11,9 @@ tags:
official official
webpack webpack
npm npm
yarn Yarn
node Node
scss sCSS
server-spawn server-spawn
server-stop server-stop
before-build-all before-build-all

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-yandex-metrica name: lektor-yandex-metrica
--- ---
categories: templates categories: templates
@ -7,4 +9,4 @@ tags:
analytics analytics
Yandex Metrica Yandex Metrica
setup-env setup-env
jinja globals Jinja globals

View File

@ -0,0 +1,5 @@
_model: page
---
title: tags
---
_template: plugin-tags.html

View File

@ -3,5 +3,6 @@ name = Plugins
inherits = page inherits = page
label = {{ this.title }} label = {{ this.title }}
[children] # Re-enable after being able to specify 2 models choices instead of only one
model = plugin # [children]
# model = plugin

View File

@ -9,7 +9,7 @@ setup(
py_modules=['lektor_project_data'], py_modules=['lektor_project_data'],
install_requires=[ install_requires=[
'requests', 'requests',
'readme_renderer==20.0', 'readme_renderer[md]==24.0',
], ],
entry_points={ entry_points={
'lektor.plugins': [ 'lektor.plugins': [

View File

@ -28,4 +28,6 @@
<div class="plugin"> <div class="plugin">
{{ render_plugin_list(this.items) }} {{ render_plugin_list(this.items) }}
</div> </div>
<p>View a list of all Lektor plugin tags <a href="/plugins/tags" class="ref">here</a>.</p>
{% endblock %} {% endblock %}

View File

@ -0,0 +1,24 @@
{% extends "plugin.html" %}
{% block body %}
<h1>Plugin Tags</h1>
<p>
This is a list of all tags that Lektor plugins have.
Click on individual tags to see which plugins use that tag.
</p>
<div class="row">
{% set tags = this.parent.children.distinct("tags") %}
{% for column in tags|sort|slice(3) %}
<div class="col-md-4 child">
<ul>
{% for tag in column %}
<li><a href="{{ ('/plugins@tag/' ~ tag ~ '/')|url }}">{{ tag }}</a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% endblock %}

View File

@ -63,11 +63,12 @@
{% if this.tags %} {% if this.tags %}
{% for t in this.tags|sort %} {% for t in this.tags|sort %}
{{ "and " if loop.last }} {{ "and " if loop.last }}
<a href="{{ ('/plugins/tag/' ~ t.lower() ~ '/')|url }}">{{ t }}</a>{{ ", " if not loop.last }} <a href="{{ ('/plugins@tag/' ~ t ~ '/')|url }}">{{ t }}</a>{{ ", " if not loop.last }}
{% endfor %} {% endfor %}
{% else %} {% else %}
<p>Plugin has no tags.</p> <p>Plugin has no tags.</p>
{% endif %} {% endif %}
<p>View <a href="/plugins/tags" class="ref">all tags</a>.</p>
</div> </div>
<div class="col-sm-9 doc-styling"> <div class="col-sm-9 doc-styling">

View File

@ -21,4 +21,11 @@
{{ render_plugin_list(category.children) }} {{ render_plugin_list(category.children) }}
</div> </div>
{% endfor %} {% endfor %}
<h2>Tags</h2>
<p>
Plugins are also tagged with keywords and topics.
Their tags are listed on their page and are navigable.
You can view a list of all of the tags <a href="/plugins/tags" class="ref">here</a>.
</p>
{% endblock %} {% endblock %}