-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Option to disable resources duplication #11995
Comments
I agree that we should fix this, but it will not happen in |
I understand the point you raise, but I want to clarify this statement for anyone else who stumbles across this:
You can disable the format-dependent behavior with:
I know that doesn't solve your problem, but it provides uniform behavior for anyone who needs/wants it. |
Also, I thinks that this option to duplicate resources could (optionally) be moved down to page level. For instance, we might want to disable this behavior globally and then enable it for a section or a specific page via frontmatter flags. |
So... Could it be fixed in v0.127.0?
The problems is, that due to the way we do the translations, all translation pages are not in markdown format, but in HTML. So, there seems to be no way to disable this behavior. And possibly it could have be controlled from a single configuration point, since this is not semantically related the transformation of content pages. |
There is a problem that page resources are being duplicated to all the languages. This is going to be fixed in 0.123, but only for markdown (could be enabled as an option for goldmark renderer)
Here is an example site that shows the issue. There are 2 pages named
test
andtest2
. Both pages are translated into 2 languages. Translations intest
page are in markdown format. Translations intest2
are in html format (while original language is still in markdown).In hugo 0.122 and prior versions resources for both pages are being duplicated into all languages. In hugo 0.123 they are duplicated only if the translations are non-markdown pages. In the example above site
test
page resources are not duplicated, but fortest2
they are.This behavior seems to be a bit counter-intuitive, since resource duplication depends on source translation file format. Also, there is no way to disable this.
I think that there should be some option, that would control resource duplication for translations, and it should not be format-dependent.
In our case it creates a lot of problems. Our website that is 4,5Gb for main language and it is translated into 11 additional languages, and since translations are all in html files, all the resources (even not used ones) are being copied and duplicated int all the languages. So, the entire website ends up in 33Gb. If we remove all the duplicated resources, this number drops to 6,5Gb.
Building and deploying 33Gb is very resource-intensive, and our pipelines (that include publishing) run not for minutes, but for over an hour.
Having this fixed is really critical for us, and we were eagerly anticipating 0.123, but it does not solve our problems.
The text was updated successfully, but these errors were encountered: