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

Template Improvements #710

Closed
wants to merge 34 commits into from
Closed

Template Improvements #710

wants to merge 34 commits into from

Conversation

phish108
Copy link

Hi all

This pull request adds a few improvements for templating that I carried in my fork for a long time.

  1. More flexibility for relative links
  2. Entry and Page Asset Counts

More flexibility for relative links

The patch adds a relative attribute to most (all?) tags that handle URLs. The relative attribute accepts two values.

  1. 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.

  2. 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.

@ghost ghost assigned yuji Nov 30, 2018
@phish108
Copy link
Author

Seems that all tests related to my code pass, but the CI fails due to errors unrelated to my changes.

@ghost
Copy link

ghost commented Dec 3, 2018

@yuji
対応お願いします。

@phish108
Copy link
Author

Hi,

Any feedback, folks?

@yuji
Copy link
Contributor

yuji commented Jan 26, 2019

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?

  • More flexibility for relative links
  • Entry and Page Asset Counts

Thanks,

@phish108
Copy link
Author

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.

@yuji
Copy link
Contributor

yuji commented Jan 27, 2019

Hi @phish108,

Thanks for everything.

@charsbar
Copy link
Contributor

charsbar commented Dec 9, 2019

#811, #812

@charsbar charsbar closed this Dec 9, 2019
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