-
Notifications
You must be signed in to change notification settings - Fork 110
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
Template Improvements #710
Conversation
update to mt6.0.6
Merge upstream
include cut marks in the docu
Seems that all tests related to my code pass, but the CI fails due to errors unrelated to my changes. |
@yuji |
Hi, Any feedback, folks? |
Hi @phish108 Thanks for your pull request. We will consider your feature request because we already have same request in our Issue Tracker. However, if your request is accepted, you must agreed to abandon the copyright of the code, and your code may not be adopted as it is. Is it OK? So, could you please separate a pull request for each features?
Thanks, |
Hi @yuji, the conditions are OK as long as you keep pushing updates here (thank you btw.). Separating is a bit difficult as some changes date way back, so this will take a few days. |
Hi @phish108, Thanks for everything. |
Hi all
This pull request adds a few improvements for templating that I carried in my fork for a long time.
More flexibility for relative links
The patch adds a
relative
attribute to most (all?) tags that handle URLs. The relative attribute accepts two values.protocol - removes the protocol schema from the URL resulting in
//host.example.com/...
URLs. This is very handy if a site is handled through http and https simultaneously.host - removes the protocol schema and host from the URL resulting in absolute paths, only. This is extremely useful for sites that are handled through multiple domain names, but the visitors should remain on the initial site, so redirection through fully qualified names not an option.
Entry and Page Asset Counts
Two handy tags for sites with resources associated to entries or pages.
EntryAssetCount
PageAssetCount
I use these tags to conditionally render asset-related blocks for entries and pages, as well as the related archives/indices.