From eb0a60ab33648b6b8ee633a5af86ee61d9398abd Mon Sep 17 00:00:00 2001 From: relikd Date: Fri, 22 Apr 2022 14:43:07 +0200 Subject: [PATCH] v0.9.7 --- examples/Examples.lektorproject | 2 +- examples/README.md | 7 +++++-- setup.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/Examples.lektorproject b/examples/Examples.lektorproject index a5fca33..e88801b 100644 --- a/examples/Examples.lektorproject +++ b/examples/Examples.lektorproject @@ -2,4 +2,4 @@ name = GroupBy Examples [packages] -lektor-groupby = 0.9.6 +lektor-groupby = 0.9.7 diff --git a/examples/README.md b/examples/README.md index d58afb1..21fc787 100644 --- a/examples/README.md +++ b/examples/README.md @@ -279,11 +279,14 @@ This is useful if you do not want to create subpages but rather an index page co This can be done in combination with the next use-case: ```jinja2 -{%- for x in this|vgroups('TestA', 'TestB', recursive=True)|unique|sort %} +{%- for x in this|vgroups(keys=['TestA', 'TestB'], fields=[], flows=[], recursive=True)|unique|sort %} ({{ x.group }}) {%- endfor %} ``` You can query the groups of any parent node (including those without slug). +[`templates/page.html`](./templates/page.html) uses this. The keys (`'TestA', 'TestB'`) can be omitted which will return all groups of all attributes (you can still filter them with `x.config.key == 'TestC'`). -Refer to [`templates/page.html`](./templates/page.html) for usage. +The `fields` and `flows` params are also optional. +With these you can match groups in `args.key.fieldKey` and `args.key.flowKey`. +For example, if you have a “tags” field and an “additional-tags” field and you only want to show one in a preview. diff --git a/setup.py b/setup.py index 109f17a..ee6eb3b 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( }, author='relikd', url='https://github.com/relikd/lektor-groupby-plugin', - version='0.9.6', + version='0.9.7', description='Cluster arbitrary records with field attribute keyword.', long_description=longdesc, long_description_content_type="text/markdown",