-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Server Side Includes #97
Comments
Do you have some use cases for SSI and is that feature really use it nowadays? |
Yes badly our website is mostly static, but some parts need tokens, and other dynamic includes. Would nice to have one more point to change from nginx or apache. |
Possibly including a opt-in build with Handlebars might be useful? |
Using Handlebars or Terra might be easier than implementing SSI as there are already implementations that are widely used. Are there things that SSI can do that Rust template engines cannot do? Including a template engine like this could be a very nice feature for SWS but it would of course introduce extra dependencies and complexity. |
@double-daruma Handlebars and Terra look like good alternatives also askama but I will need to explore them a bit to decide which one. But I'm in favor of going with a template engine rather than implementing SSI. Also, I can see other benefits like sharing request information (URI, headers, etc) with the templates apart from control flow, importing other template files, etc. Another benefit that I can see is using this feature to power also the directory listing and the error pages as templates so users can customize them as needed. |
Is your feature request related to a problem? Please describe.
Have a way to use SSI (https://en.wikipedia.org/wiki/Server_Side_Includes)
Something like https://nginx.org/en/docs/http/ngx_http_ssi_module.html
Describe the solution you'd like
Support at least SSI include
<!--# include file="footer.html" -->
and<!--# include virtual="/remote/body.php?argument=value" -->
Good would be a minimal support like http://acme.com/software/thttpd/ssi_man.html but with the possibility to use
../
until we reach the base dir.Describe alternatives you've considered
switch to other servers
Additional context
Add any other context or screenshots about the feature request here if needed.
The text was updated successfully, but these errors were encountered: