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

RFC: Generic file assets #520

Closed
RealOrangeOne opened this Issue Nov 15, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@RealOrangeOne
Copy link
Contributor

RealOrangeOne commented Nov 15, 2018

There's currently 2 main types of content: Pages and static files. Copying off a design pattern from Jekyll, i'd like to add a 3rd, which i'll refer to assets.

Given an additional subdirectory in the project root, assets/, all files inside are copied to the output directory as-is, as with static files, but are passed through the template engine first.

Internally, this could be used to remove special casing for files such as robots.txt and sitemap.xml, as these could both be implemented as assets. Assets would need resolving after pages, as they'll likely want / need the rendered pages as context.

@Keats

This comment has been minimized.

Copy link
Collaborator

Keats commented Nov 16, 2018

this could be used to remove special casing for files such as robots.txt and sitemap.xml,

It isn't that easy sadly. sitemap also gets all taxonomies and this issue made me realise it is missing the pager pages for both sections and taxonomies in case it is paginated :(

@RealOrangeOne

This comment has been minimized.

Copy link
Contributor Author

RealOrangeOne commented Nov 16, 2018

The taxonomy data would still be available though right? If we stored the taxonomy data on the site, and passed that through the context, it could still be used. I think these issues are separate (although it's probably best to fix the sitemap before moving it, so everything is considered

@Keats

This comment has been minimized.

Copy link
Collaborator

Keats commented Nov 22, 2018

That would slow down the overall rendering of the site to pass all that data for more files though. The sitemap only gets the URLs for example but it is pretty slow to render when you have 10k pages

@Keats

This comment has been minimized.

Copy link
Collaborator

Keats commented Nov 22, 2018

Can we move the discussion to the feature request section of https://zola.discourse.group/ ?

@RealOrangeOne

This comment has been minimized.

Copy link
Contributor Author

RealOrangeOne commented Nov 22, 2018

Added, awaiting moderation. I'll close this post once that's live.

@Keats

This comment has been minimized.

Copy link
Collaborator

Keats commented Nov 22, 2018

@Keats Keats closed this Nov 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment