Link to file without getting content hash in downloaded file's name #12033
Unanswered
Feuermurmel
asked this question in
Q&A
Replies: 2 comments 3 replies
-
|
Btw I have a workaround now using this in a |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You need to put your file in https://docusaurus.io/docs/markdown-features/assets#static-assets |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the
@docusaurus/plugin-content-docsplugin to generate a site. The pages link to files that users should download (e.g. PDF files). My problem is that in the built site, the files have their content's hash added to the file names. This results in the downloaded files also having that hash in their name. I would like to find a way to prevent that.I know that the content hash is intentionally added to the file names so that the web server can send headers to allow aggressively caching the files. I like that.
The project's structure looks like this:
index.mxd:And the file structure of the generated site looks like this:
What I tried is to write a plugin using the
configureWebpack()hook to change the file name pattern used by Webpack for these assets. But I think I'm poking at the wrong place, because I can't see any change to the output file structure:My goal with the plugin was to change the output file structure to this:
Is there any way I can achieve this? Or is this potentially a feature that Docusaurus could provide via an option/configuration?
Beta Was this translation helpful? Give feedback.
All reactions