Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split generation out per content type #155

Open
bartfeenstra opened this issue Jul 15, 2019 · 1 comment · May be fixed by #458
Open

Split generation out per content type #155

bartfeenstra opened this issue Jul 15, 2019 · 1 comment · May be fixed by #458
Labels
enhancement New feature or request python Pull requests that update Python code

Comments

@bartfeenstra
Copy link
Owner

bartfeenstra commented Jul 15, 2019

Move generation to plugins, and let plugins expose generators. A genrator can output public data and ahould then define a content define the formats (content types, etc) they can generate. By default we ship with a plugin that generates text/html, but we can later add others, such as application/ld+json , or even one for nginx configuration.

@bartfeenstra bartfeenstra changed the title Split rendering our per content type Split rendering out per content type Sep 5, 2019
@bartfeenstra bartfeenstra added the enhancement New feature or request label Oct 16, 2019
@bartfeenstra bartfeenstra changed the title Split rendering out per content type Split generation out per content type Mar 30, 2020
@bartfeenstra
Copy link
Owner Author

Alternatively we can take a file-based approach. This means that for every resource type we want to render, there's a directory in the file system with templates. For each resource, these are copied to the resource's destination directory, and then rendered. The advantages are that the generation API does not need to know which files are being rendered: it just provides the source directory path, destination directory path, and template variables. The renderers will do the rest. Plugins and individual site configurations can then override or add files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant