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-admonition = 0.1
lektor-atom = 0.2
lektor-tags = 0.1
lektor-tags = 0.3
lektor-slugify = 0.4

View File

@ -1,2 +1,3 @@
parent = /plugins
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
---
categories: content
---
tags:
asciidoc
AsciiDoc
field type
setup-env

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-nofollow
---
categories: content
@ -5,7 +7,7 @@ categories: content
tags:
nofollow links
markdown
Markdown
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
---
categories: build
@ -5,11 +7,13 @@ categories: build
tags:
webpack
browserify
Browserify
Parcel
Babel
Sass
yarn
Node
npm
Yarn
server-spawn
server-stop
before-build-all

View File

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

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-read-full-post
---
categories: content
@ -5,8 +7,8 @@ categories: content
tags:
setup-env
jinja globals
Jinja globals
blog
markdown
Markdown
---
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
---
categories: templates
@ -5,5 +7,5 @@ categories: templates
tags:
navigation
jinja filters
Jinja filters
setup-env

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,5 @@
_model: plugin
---
name: lektor-yandex-metrica
---
categories: templates
@ -7,4 +9,4 @@ tags:
analytics
Yandex Metrica
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
label = {{ this.title }}
[children]
model = plugin
# Re-enable after being able to specify 2 models choices instead of only one
# [children]
# model = plugin

View File

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

View File

@ -28,4 +28,6 @@
<div class="plugin">
{{ render_plugin_list(this.items) }}
</div>
<p>View a list of all Lektor plugin tags <a href="/plugins/tags" class="ref">here</a>.</p>
{% 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 %}
{% for t in this.tags|sort %}
{{ "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 %}
{% else %}
<p>Plugin has no tags.</p>
{% endif %}
<p>View <a href="/plugins/tags" class="ref">all tags</a>.</p>
</div>
<div class="col-sm-9 doc-styling">

View File

@ -21,4 +21,11 @@
{{ render_plugin_list(category.children) }}
</div>
{% 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 %}