-
Notifications
You must be signed in to change notification settings - Fork 2
/
_config.yml
89 lines (88 loc) · 2.62 KB
/
_config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
title: BLR.today
description: >- # this means to ignore newlines until "baseurl:"
Semi-curated event listings for Bangalore
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://blr.today" # the base hostname & protocol for your site, e.g. http://example.com
plugins:
- jekyll_sqlite
- jekyll-datapage-generator
- jekyll-sitemap
include:
- _headers
- _redirects
exclude:
- .editorconfig
- .gitignore
- Gemfile*
- vendor
- .jekyll-cache
- rollup.config.js
- package*
- js # this is built into assets/js/
- netlify.toml
- README.md
- events.db
# TODO: fixme
- default.ics
- node_modules
timezone: Asia/Kolkata
defaults:
- scope:
path: "cal/*.md"
values:
layout: events
permalink: /:path/:basename/
subscribe: true
# While this is available under the page
# this is dynamic, and not available for use
# in sql queries, or copied to external layouts
# TODO: Fix jekyll-sqlite and multi-page layouts to support this
excludeTags: '["BUSINESS", "LOW-QUALITY", "NOTINBLR", "DANDIYA", "WOOWOO"]'
layouts:
- layout: icalendar.ics
permalink: /:path/:basename/cal.ics
- layout: agenda.rss
permalink: /:path/:basename/agenda.xml
sqlite:
- data: events
file: events.db
query: |
WITH
allowlist_tags AS (
SELECT value FROM json_each(:tags)
),
denylist_tags AS (
SELECT value FROM json_each('["BUSINESS", "LOW-QUALITY", "NOTINBLR", "DANDIYA", "WOOWOO"]')
)
SELECT *
FROM events
WHERE
-- Check if no denylist tags are present
NOT EXISTS (
SELECT 1
FROM denylist_tags
WHERE denylist_tags.value IN (
SELECT value
FROM json_each(event_json->'$.keywords')
)
)
AND
-- Check if at least one allowlist tag is present
EXISTS (
SELECT 1
FROM allowlist_tags
WHERE allowlist_tags.value IN (
SELECT value
FROM json_each(event_json->'$.keywords')
)
)
ORDER BY event_json -> '$.startDate';
sqlite:
- data: geo_events
file: events.db
query: |
SELECT url,
event_json->'$.location.geo.latitude' as lat,
event_json->'$.location.geo.longitude' as lng,
event_json-> '$.location.name' as name
from events WHERE event_json -> '$.location.geo' IS NOT NULL