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

events.icsをイベントのページから生成するようにした #52

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ on:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
Expand All @@ -30,7 +31,7 @@ jobs:
run: pnpm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: "./public"

Expand All @@ -46,7 +47,7 @@ jobs:
name: github-pages
url: https://until-tsukuba.github.io

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/deploy-pages@v1
- uses: actions/deploy-pages@v4
15 changes: 0 additions & 15 deletions src/_data/events.json

This file was deleted.

24 changes: 13 additions & 11 deletions src/ical.njk
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//until./until-tsukuba.github.io//NONSGML v1.0//JP
X-WR-TIMEZONE:UTC
{% for event in events %}
{%- for event in collections.event %}
BEGIN:VEVENT
DTSTART;TZID=UTC;VALUE=DATE-TIME:{{ event.dtstart | date | dateToISO8601 }}
DTEND;TZID=UTC;VALUE=DATE-TIME:{{ event.dtend | date | dateToISO8601 }}
SUMMARY:{{ event.name }}
{% if event.location !== undefined %}
LOCATION:{{ event.location }}
{% endif %}
{% if event.url !== undefined %}
URL:{{ event.url }}
{% endif %}
UID:{{ event.page.fileSlug }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slugをUIDとして活用するの、多分正しいがそれで良いかは確認が必要そう

DTSTAMP:{{ event.page.date | date | dateToISO8601 }}
DTSTART;VALUE=DATE-TIME:{{ event.data.dtstart | date | dateToISO8601 }}
DTEND;VALUE=DATE-TIME:{{ event.data.dtend | date | dateToISO8601 }}
SUMMARY:{{ event.data.title }}
{% if event.data.location !== undefined -%}
LOCATION:{{ event.data.location }}
{%- endif %}
{% if event.url !== undefined -%}
URL:{{ "https://until-tsukuba.github.io" + event.url }}
{% endif -%}
END:VEVENT
{% endfor %}
{%- endfor %}
END:VCALENDAR