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

Support rendering static files non root directories #71

Open
sarge opened this issue Feb 10, 2021 · 2 comments
Open

Support rendering static files non root directories #71

sarge opened this issue Feb 10, 2021 · 2 comments

Comments

@sarge
Copy link
Contributor

sarge commented Feb 10, 2021

Currently only static filename.jet templates get rendered if they are in the root path.

This is managed by
https://github.com/shift72/kibble/blob/master/kibble/render/render.go#L129-L152

To render files in other directories we could do one of 3 things.
a) provide a list of directories to check
b) check all directories except the convention of templates
c) refactor the rendering into a datasource being FileSystem. This will find all jet files in the folder and render them

 {
            "name": "dir1",
            "urlPath": "/dir1",
            "datasource": "FileSystem"
 },
@stajs
Copy link
Contributor

stajs commented Feb 10, 2021

I don't understand the work involved for c) but suspect a) and b) to be less work, and would prefer a) to not blindly scan all dirs when the majority of sites won't have any outside them. If a) was chosen, would you pass the list of dirs in via kibble.json?

@sarge
Copy link
Contributor Author

sarge commented Feb 10, 2021

@stajs Ended up going with c) as it gave some scope for including or excluding files for each language. Some clean up included which made the effort look larger than it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants