Skip to content

Local scope, page variables, and refactor; oh my!#12

Merged
rickychilcott merged 5 commits into
masterfrom
meitar-local-scope
Apr 8, 2020
Merged

Local scope, page variables, and refactor; oh my!#12
rickychilcott merged 5 commits into
masterfrom
meitar-local-scope

Conversation

@rickychilcott
Copy link
Copy Markdown
Member

@rickychilcott rickychilcott commented Apr 8, 2020

Support many ways to set url for the ical tag

---
cal_url: "https://space.floern.com/launch.ics"
---

{% ical url: page.cal_url %}
  {{ event.summary }}
{% endical %}

{% assign url = "https://space.floern.com/launch.ics" %}
{% ical url: url %}
  {{ event.summary }}
{% endical %}

{% ical url: https://space.floern.com/launch.ics %}
  {{ event.summary }}
{% endical %}

Close @11; Thanks @meitar

Version 1.0.9 will be published soon

fabacab and others added 5 commits April 7, 2020 14:29
This increases the utility of the plugin by allowing the `url` parameter
to accept the name of a variable in the (first) local scope to its
rendering context. In other words, this allows uses such as:

```
{% assign url = page.calendar_address %}
{% ical url: url %}
...
{% endical %}
```

This is particularly useful for layouts, includes, and other non-leaf
areas of Jekyll's templating system in which it does not make sense to
hardcode a given iCalendar URL.
@rickychilcott
Copy link
Copy Markdown
Member Author

Note @meitar I relaxed the jekyll version to support v3 and up. So you may be able to use the official gem.

@rickychilcott rickychilcott merged commit c1c4fdf into master Apr 8, 2020
@rickychilcott rickychilcott deleted the meitar-local-scope branch April 8, 2020 02:05
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.

2 participants