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 for layout includes #1

Open
srid opened this issue Mar 26, 2021 · 1 comment
Open

Support for layout includes #1

srid opened this issue Mar 26, 2021 · 1 comment

Comments

@srid
Copy link

srid commented Mar 26, 2021

The extends and block feature is documented here.

Could this be supported in Giraffe.DotLiquid?

Here's a rough working version that hardcodes the templates directory: https://gist.github.com/srid/645fcc6363852e7617c4fd356463860a

@dustinmoris
Copy link
Member

Quickly looking at the code you've written it looks like that DotLiquid has a global static setting for the tempaltes path which you could set at the beginning of your Program.fs and simply call this once:

Template.FileSystem <- LocalFileSystem(templateFolder)

Then you should be able to use the Giraffe.DotLiquid handlers without any extra changes.

Let me know if that works for you!

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