diff --git a/content/plugin-categories/build/contents.lr b/content/plugin-categories/build/contents.lr new file mode 100644 index 00000000..43c6708a --- /dev/null +++ b/content/plugin-categories/build/contents.lr @@ -0,0 +1 @@ +name: Build diff --git a/content/plugin-categories/content/contents.lr b/content/plugin-categories/content/contents.lr new file mode 100644 index 00000000..ab96a980 --- /dev/null +++ b/content/plugin-categories/content/contents.lr @@ -0,0 +1 @@ +name: Content diff --git a/content/plugin-categories/contents.lr b/content/plugin-categories/contents.lr new file mode 100644 index 00000000..8a35b461 --- /dev/null +++ b/content/plugin-categories/contents.lr @@ -0,0 +1,3 @@ +_model: plugin-categories +--- +_slug: plugins/categories diff --git a/content/plugin-categories/deploy/contents.lr b/content/plugin-categories/deploy/contents.lr new file mode 100644 index 00000000..79a2a729 --- /dev/null +++ b/content/plugin-categories/deploy/contents.lr @@ -0,0 +1 @@ +name: Deploy diff --git a/content/plugin-categories/templates/contents.lr b/content/plugin-categories/templates/contents.lr new file mode 100644 index 00000000..71a04a80 --- /dev/null +++ b/content/plugin-categories/templates/contents.lr @@ -0,0 +1 @@ +name: Templates diff --git a/content/plugins/contents.lr b/content/plugins/contents.lr new file mode 100644 index 00000000..7e564258 --- /dev/null +++ b/content/plugins/contents.lr @@ -0,0 +1,16 @@ +_model: plugins +--- +title: Lektor Loves Plugins +--- +body: + +#### banner #### +image: header.jpg +---- +height: 300 +---- +contents: image content +#### text-block #### +text: some text +---- +class: default diff --git a/content/plugins/disqus-comments/contents.lr b/content/plugins/disqus-comments/contents.lr new file mode 100644 index 00000000..09391027 --- /dev/null +++ b/content/plugins/disqus-comments/contents.lr @@ -0,0 +1,5 @@ +title: Disqus Comments +--- +official: yes +--- +categories: templates diff --git a/content/plugins/header.jpg b/content/plugins/header.jpg new file mode 100644 index 00000000..5173842b Binary files /dev/null and b/content/plugins/header.jpg differ diff --git a/content/plugins/jinja-content/contents.lr b/content/plugins/jinja-content/contents.lr new file mode 100644 index 00000000..06c3b6a3 --- /dev/null +++ b/content/plugins/jinja-content/contents.lr @@ -0,0 +1,4 @@ +title: Jinja Content +--- +categories: content +--- diff --git a/content/plugins/markdown-admonition/contents.lr b/content/plugins/markdown-admonition/contents.lr new file mode 100644 index 00000000..16570399 --- /dev/null +++ b/content/plugins/markdown-admonition/contents.lr @@ -0,0 +1,7 @@ +title: Markdown Admonition +--- +categories: content +--- +link: https://pypi.org/project/lektor-markdown-admonition/ +--- +official: yes diff --git a/content/plugins/markdown-highlighter/contents.lr b/content/plugins/markdown-highlighter/contents.lr new file mode 100644 index 00000000..f9c3815e --- /dev/null +++ b/content/plugins/markdown-highlighter/contents.lr @@ -0,0 +1,7 @@ +title: Markdown Highlighter +--- +categories: content +--- +link: https://pypi.org/project/lektor-markdown-highlighter/ +--- +official: yes diff --git a/content/plugins/webpack-support/contents.lr b/content/plugins/webpack-support/contents.lr new file mode 100644 index 00000000..a28afc66 --- /dev/null +++ b/content/plugins/webpack-support/contents.lr @@ -0,0 +1,7 @@ +title: Webpack Support +--- +categories: build +--- +link: https://pypi.org/project/lektor-webpack-support/ +--- +official: yes diff --git a/databags/menu.ini b/databags/menu.ini index ab5e414d..19b6ab34 100644 --- a/databags/menu.ini +++ b/databags/menu.ini @@ -10,6 +10,14 @@ label = Documentation path = /showcase label = Showcase +[plugins] +path = /plugins +label = Plugins + +# [themes] +# path = /themes +# label = Themes + [community] path = /community label = Community diff --git a/models/plugin-categories.ini b/models/plugin-categories.ini new file mode 100644 index 00000000..c9b4a1ae --- /dev/null +++ b/models/plugin-categories.ini @@ -0,0 +1,9 @@ +[model] +name = Plugin Categories +label = Plugin Categories +hidden = yes +protected = yes + +[children] +model = plugin-category +order_by = name diff --git a/models/plugin-category.ini b/models/plugin-category.ini new file mode 100644 index 00000000..c532d51c --- /dev/null +++ b/models/plugin-category.ini @@ -0,0 +1,11 @@ +[model] +name = Plugin Category +label = {{ this.name }} +hidden = yes + +[children] +replaced_with = site.query('/plugins').filter(F.categories.contains(this)) + +[fields.name] +label = Name +type = string diff --git a/models/plugin.ini b/models/plugin.ini new file mode 100644 index 00000000..581b3cb1 --- /dev/null +++ b/models/plugin.ini @@ -0,0 +1,27 @@ +[model] +name = Plugin +inherit = page +label = {{ this.title }} + +[children] +enabled = no + +[fields.title] +label = Title +type = string +size = large + +[fields.official] +label = Official +type = boolean +checkbox_label = If true, then the plugin will be marked as official. +default = false + +[fields.link] +label = PyPI Link. We use this to scrape information about your project and display it on this site. +type = url + +[fields.categories] +label = Categories +type = select +source = site.query('/plugin-categories') diff --git a/models/plugins.ini b/models/plugins.ini new file mode 100644 index 00000000..e991a425 --- /dev/null +++ b/models/plugins.ini @@ -0,0 +1,7 @@ +[model] +name = Plugins +inherits = page +label = {{ this.title }} + +[children] +model = plugin diff --git a/templates/macros/plugins.html b/templates/macros/plugins.html new file mode 100644 index 00000000..75fe4430 --- /dev/null +++ b/templates/macros/plugins.html @@ -0,0 +1,26 @@ +{% macro render_category_nav(active=none) %} + +{% endmacro %} + +{% macro render_plugin_list(plugins, active=none) %} + +{% endmacro %} diff --git a/templates/plugin-categories.html b/templates/plugin-categories.html new file mode 100644 index 00000000..e8c3687b --- /dev/null +++ b/templates/plugin-categories.html @@ -0,0 +1,7 @@ +{% extends "layout.html" %} +{% from "macros/plugins.html" import render_category_nav %} +{% block title %}Plugin Categories{% endblock %} +{% block body %} +

Plugin Categories

+ {{ render_category_nav(active=none) }} +{% endblock %} diff --git a/templates/plugin-category.html b/templates/plugin-category.html new file mode 100644 index 00000000..5dd24dbb --- /dev/null +++ b/templates/plugin-category.html @@ -0,0 +1,9 @@ +{% extends "layout.html" %} +{% from "macros/plugins.html" import render_category_nav, + render_plugin_list %} +{% block title %}Plugin Category {{ this.name }}{% endblock %} +{% block body %} +

Plugin Category {{ this.name }}

+ {{ render_category_nav(active=this._id) }} + {{ render_plugin_list(this.children) }} +{% endblock %} diff --git a/templates/plugin.html b/templates/plugin.html new file mode 100644 index 00000000..d9ce7e22 --- /dev/null +++ b/templates/plugin.html @@ -0,0 +1,8 @@ +{% extends "layout.html" %} +{% from 'macros/blocksupport.html' import render_full_width_blocks %} +{% block title %}{{ this.title }}{% endblock %} +{% block outerbody %} +

{{ this.title }}

1111 + {{ this.summary }}2222 + {{ this.repo }}333 +{% endblock %} diff --git a/templates/plugins.html b/templates/plugins.html new file mode 100644 index 00000000..713078d3 --- /dev/null +++ b/templates/plugins.html @@ -0,0 +1,11 @@ +{% extends "layout.html" %} +{% from "macros/plugins.html" import + render_plugin_list, render_category_nav %} +{% from 'macros/blocksupport.html' import render_full_width_blocks %} +{% block title %}{{ this.title }}{% endblock %} +{% block outerbody %} + {% call render_full_width_blocks(this.body.blocks, classes='col-md-12') %} +

{{ this.title }}

+ {{ render_plugin_list(this.children) }} + {% endcall %} +{% endblock %}