Skip to content

Allow users to insert custom Jinja environments #40

@leouieda

Description

@leouieda

Users may want to define custom environments and add custom filters to the existing ones. Currently not possible because Jinja environments are created inside the render API function directly.

To make this work, we'd need:

  1. Allow render to optionally take the environments dictionary as an argument. Default should be None which then triggers building the environments internally.
  2. Allow serve to take a rebuild function that recompiles the site. This is currently defined inside the function and wouldn't use the custom environments. Passing a custom rebuild function would also allow users to customize the build process and have it work with livereload so it solves 2 problems at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions