Skip to content
Snippets Groups Projects
Unverified Commit abc988ac authored by Lukas Ruge's avatar Lukas Ruge
Browse files

event.xml fällt raus

parent b426e16e
No related branches found
No related tags found
No related merge requests found
Pipeline #1940 passed
...@@ -73,7 +73,7 @@ collections: ...@@ -73,7 +73,7 @@ collections:
events: events:
title: Events title: Events
output: true output: true
permalink: event/:path.ics permalink: event/:path.xml
# 6. Jekyll collections settings # 6. Jekyll collections settings
defaults: defaults:
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
{% if event.eventics %} {% if event.eventics %}
<a href="{{ event.eventics }}">Dieses Event in den Kalender Importieren</a><br> <a href="{{ event.eventics }}">Dieses Event in den Kalender Importieren</a><br>
{% endif %} {% endif %}
<a href="{{ site.baseurl }}{{event.url}}" style="color:#D0D0D0; text-decoration:none;">event.xml</a>
{% assign eventurl = event.url %} {% assign eventurl = event.url %}
{% assign eventurl = eventurl | prepend: site.baseurl | prepend: site.url %} {% assign eventurl = eventurl | prepend: site.baseurl | prepend: site.url %}
<!--<a href="{{ eventurl }}" type="text/calendar">Event Importieren</a>--> <!--<a href="{{ eventurl }}" type="text/calendar">Event Importieren</a>-->
......
---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<event>
<name>{{page.title}}</name>
<date>{{page.eventdate}}</date>
<end>{{page.eventend}}</end>
<uid>{{page.uid}}</uid>
<location>
{% for location in page.locations %}
<location>{{ location | xml_escape }}</location>
{% endfor %}
</location>
<short>{{page.short}}</short>
</event>
File moved
---
layout: default
---
{% include site-header.html %}
<main class="main container">
<article class="article article--page content typeset">
<h1>{{ page.title }}</h1>
{% assign counter = 0 %}
{% assign eventcollection = site.events | sort: 'eventdate' %}
{% for event in eventcollection %}
{% capture posttime %}{{event.eventdate | date: '%s'}}{% endcapture %}
{% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{% assign inthirtydays = nowunix | plus: 2592000 %}
{% assign nowdate = nowunix | plus: 0 %}
{% assign postdate = posttime | plus: 0 %}
{% if postdate < inthirtydays and postdate > nowdate %}
{% if counter < 20 %}
{% assign counter = counter | plus: 1 %}
<p>{{ event.eventdate | date: "%d.%m.%Y %H:%M" }}: {{ event.title | xml_escape }}</p>
{% assign eventurl = event.url %}
{% assign urllength = eventurl | size %}
{% assign urllength = urllength | minus: 7 %}
{% assign eventurl = eventurl | slice: 0, urllength %}
{{ urllength }}
<a href="{{ site.baseurl }}{{ eventurl}}">{{ event.title }}</a>
{% endif %}
{% endif %}
{% endfor %}
</article>
</main>
{% include site-footer.html %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment