complete refactoring to ensure group before build

Due to a concurrency bug (lektor/lektor#1017), a source file is
sporadically not updated because `before-build` is evaluated faster
than `before-build-all`. Fixed with a redundant build process.

Also:
- adds before- and after-init hooks
- encapsulates logic into separate classes
- fix virtual path and remove virtual path resolver
- more type hints (incl. bugfixes)
This commit is contained in:
relikd
2022-03-31 04:16:18 +02:00
parent dfdf55a5a5
commit c9c1ab69b1
3 changed files with 299 additions and 424 deletions

View File

@@ -1,11 +1,7 @@
from setuptools import setup
import re
with open('README.md') as fp:
longdesc = fp.read()
# replace fragment links with bold text
frag_links = re.compile(r'\[([^]]+)\]\(#[^)]*\)')
longdesc = frag_links.sub(lambda x: '__{}__'.format(x.group(1)), longdesc)
setup(
name='lektor-groupby',
@@ -17,7 +13,7 @@ setup(
},
author='relikd',
url='https://github.com/relikd/lektor-groupby-plugin',
version='0.9',
version='0.9.1',
description='Cluster arbitrary records with field attribute keyword.',
long_description=longdesc,
long_description_content_type="text/markdown",