-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
minify strips PHP tags #5748
Comments
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
The upstream minifier Hugo uses doesn't handle PHP tags. See tdewolff/minify#35 (comment) |
Are there any workaround for such problem? Looks like a blocking error for using PHP inside HUGO templates with --minify. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Steps to Reproduce
Add following line to a template:
{{ readFile "path/file" | safeHTML }}
run
hugo --minify
--> This part gets ommited, when using the
--minify
flag on hugo.when you run just
hugo
everything is fine.How I came up with that:
I am including a php snippet for a contact form into a hugo template. Without the use of safeHTML
<?php
gets translated to<?php
.The text was updated successfully, but these errors were encountered: