ultraq / thymeleaf-layout-dialect

A dialect for Thymeleaf that lets you build layouts and reusable templates in order to improve code reuse
https://ultraq.github.io/thymeleaf-layout-dialect/
Apache License 2.0
701 stars 112 forks source link

Handle <base> tag in head merge strategy #206

Closed RiZKiT closed 2 years ago

RiZKiT commented 3 years ago

If head merge strategy is used, the tag appears on the bottom of the head tag. But to handle relative resources in the head section, it should be in front of all resources, e.g. beside the charset meta.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base

ultraq commented 3 years ago

Hi @RiZKiT, I started to write a test for this one so I could work on it, but found that the code was already placing the <base> element at the top of the <head> section when using one of the "grouping" strategies for <head> element merging (all of the strategies that ship with the layout dialect are documented here: https://ultraq.github.io/thymeleaf-layout-dialect/Configuration.html#head-element-merging). Were you using one of the grouping strategies with the layout dialect, or the default "appending" ones?

ultraq commented 2 years ago

Old issue w/ no response from OP, so will close. If anybody else has this problem and can provide more information, feel free to comment and I might reopen it for more investigation.