Add internal resolution for assets in get_url function#3065
Open
SamWilsn wants to merge 2 commits intogetzola:nextfrom
Open
Add internal resolution for assets in get_url function#3065SamWilsn wants to merge 2 commits intogetzola:nextfrom
get_url function#3065SamWilsn wants to merge 2 commits intogetzola:nextfrom
Conversation
Compute colocated path for sections Colocated path is required for computing serialized assets and assets permalinks. Test have been added to check colocated path format as expected by those computations. Harmonize serialize assets for pages and sections Fix assets serialization behavior which was relying on the output path instead of the source path like for pages. This behavior was making assets permalinks computation fail. Add assets permalinks for pages and sections Compute assets permalinks for serialized assets based on associated page or section permalink. Add assets permalinks per language to site Assets are duplicated for every language so permalinks should be releated to it in order to be language-aware. Add assets permalinks to `get_url` Assets permalinks allows to resolve internally colocated assets as well as pages and sections. Fix documentation about galery Galery can be fixed by using internal resolution. Adding the lang as well allows to make the target URL lang-aware even if the image is just duplicated. Example file has been fixed as well even if it might not be used. Fix hashmap init for assets permalink test Check page and section entire colocated path As discussed during PR review, it is better to check for the entire path than just the required assumptions. Assumptions have been written as a comment. Rework serialize_assets and get_assets_permalinks As discussed during PR review, move option unwrapping logic outside of each function Use iterator for get_asset_permalinks As per PR discussion, align get_asset_permalinks with serialize_assets. Regroup assets serialization and permalinks calls As per PR discussion, it makes more sense to have both asset serialization and permalinks generation in the same logical unit. Change has been made for both page and section.
Contributor
Author
|
After some quick tests, it looks like this change doesn't seem to do what it should.
|
Contributor
Author
|
Updated with link. I was just hoping for a quick rebase and have this work, so I haven't dug deeply into the changes here. It's entirely possible I've misunderstood the purpose of these changes. |
This was referenced Jan 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a rebase & squash of #2726 (by @ZzMzaw) on top of the latest
nextbranch.