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

Allow templating for single static files #751

Open
bmarwell opened this issue Feb 14, 2022 · 2 comments
Open

Allow templating for single static files #751

bmarwell opened this issue Feb 14, 2022 · 2 comments

Comments

@bmarwell
Copy link

bmarwell commented Feb 14, 2022

Hi,

I would like to run my src/site/assets/.htaccess through freemarker.

Currently, this does not seem supported?

While we can do custom file names and types, it does not allow us to omit the file name:

template.securitytxt.file=securitytxt.ftl
template.securitytxt.extension=.txt

Now how would we do this with .htaccess?

@jonbullock
Copy link
Member

Would what is described in #693 cover this? I guess it depends on what .htaccess contains that would be considered "content" and what you want to do with that content with a template engine.

Or would having control over the output file name (maybe via a metadata header value) suffice?

@bmarwell
Copy link
Author

To redirect current to a specific version in our case:

https://github.com/apache/shiro-site/blob/main/src/site/assets/.htaccess#L53-L55

The data should be taken from:

https://github.com/apache/shiro-site/blob/main/data/releases.yaml#L3

Other use cases:

  • .htaccess files in other directories
  • .htpasswd files (we don't need them, just for sake of completeness)

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