Skip to content

How to suppress copying of certain directories under the static directory for certain locales while building the site #9722

Answered by slorber
allenscha asked this question in Q&A
Discussion options

You must be logged in to vote

but that seems a bit unproductive.

Hey that solves your use-case and is easy so why isn't this good enough?

I feel like we are trying to achieve useless micro-optimisations here.

Is this really a problem in practice to deploy this duplicate api ref?

Is copying for each locale + deleting a perf issue of any kind that's worth us to fix?


There is not config to exclude static directories, but we have staticDirectories to let you provide your own list.

https://docusaurus.io/docs/3.0.1/api/docusaurus-config#staticDirectories

Combined with the locale env variable (#4542 (comment)), that could solve the same use-case.

You could for example only list an api-ref static directory if locale is und…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@slorber
Comment options

Answer selected by allenscha
Comment options

You must be logged in to vote
1 reply
@slorber
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants