greghendershott / frog

Frog is a static blog generator implemented in Racket, targeting Bootstrap and able to use Pygments.
916 stars 96 forks source link

Feature request: Custom code #145

Closed matthiasbeyer closed 9 years ago

matthiasbeyer commented 9 years ago

I'd like to have an option to include custom code, which I can use in my templates then.

greghendershott commented 9 years ago

If I understand your question correctly, you already have this option: The templates are Racket code using at-expressions, in much the same way Scribble documentation files are.

You can even require other Racket modules. Because your template is not evaluated at a module body level, you can't use require to do so. However you can use local-require.

Does this answer your question? If it does not (or if you're not sure), perhaps you could provide an example of how you want to use custom code in your templates?

matthiasbeyer commented 9 years ago

Ah, I can require code myself inside templates? Well that solves my issue, thanks a lot for the fast response!


Also thank you for frog, I really enjoy using this tool!

greghendershott commented 9 years ago

Yes, just make sure to use local-require.

If you have any questions, feel free to ask; maybe open a fresh issue for that.