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

Add localeId of cloned assets at the root instead of injecting it into the fileName #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Munter
Copy link
Member

@Munter Munter commented Jan 15, 2017

Closes assetgraph/assetgraph-builder#479

With this major version bump localised assets will now be placed at /da/index.html rather than /index.da.html.

This has the effect that anchors pointing at index routes, like /path/to/page instead of path/to/page.html, will keep their referential coherence after running cloneForEachLocale.

IMO keeping referential integrity in the graph is of higher importance than keeping aligned with web server plugin specific file naming conventions, which can just be reconfigured. If we lose referential integrity we block any ability for graph transformations later in a pipeline from following the relations that now have no proper to-asset.

If we can find a way to make the url rewriting configurable, so the build system outputs what a server expects, that might be better. But I didn't want to spend time on it right now.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.61% when pulling a2ba3a3 on major/localeid-at-root into 60679c5 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.61% when pulling a2ba3a3 on major/localeid-at-root into 60679c5 on master.

@papandreou
Copy link
Member

I really like this idea. I think we should expose cloneForEachLocale in the main export through some sort of mode switch, and then have another mode switch that turns on this behavior.

IMO keeping referential integrity in the graph is of higher importance than keeping aligned with web server plugin specific file naming conventions

Very much agreed. It's an endless source of pain and hacks whenever we break the references (as evidenced by that ag-b PR).

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

Successfully merging this pull request may close these issues.

None yet

3 participants