.. | ||
lektor_community_generator | ||
.gitignore | ||
README.md | ||
setup.cfg | ||
setup.py |
community-generator
The community-generator plugin is provides a way for users to filter resources on the training resources page, without javascript or a web backend. It accomplushes this by generating a set of lektor contents files for each combination of filters.
You shouldn't need to do anything or know anything about this plugin in order to use it.
Developing
The plugin has a few different pieces:
- The main generation logic, which resides in the
community-generator/lektor_community_generator/
directory. - lektor templates:
empty.html
,resources-sortby.html
resources_filter.html
- a lektor model
sortby_resources.ini
generated by the plugin, and added to the top-level .gitignore - a set of generated lektor contents files, in
content/training/resources/sortby/
- a
content/training/resources/.gitignore
file, ignoring the generated lektor contents files
If you want to change what's in the generated contents.lr files, look into the lektor_community_generator/file_templates.py
file, and the generate_files
function in lektor_community_generator/__init__.py
.
If you want to change the model of the generated contents files, look at lektor_community_generator/file_templates.py
If you want to change the templates, look into the reousrces-sortby.html
, resources_filter.html
, and resources_list.html
templates