From d4a9b1565dde61ebb232e9502f91e29d964f873c Mon Sep 17 00:00:00 2001
From: svemagie <869694+svemagie@users.noreply.github.com>
Date: Wed, 25 Mar 2026 16:34:11 +0100
Subject: [PATCH] fix: "home" locations not counted
---
_data/whereCheckins.js | 2 ++
where.njk | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/_data/whereCheckins.js b/_data/whereCheckins.js
index 3ffb0cd..7b4c04d 100644
--- a/_data/whereCheckins.js
+++ b/_data/whereCheckins.js
@@ -345,6 +345,7 @@ function normalizeCheckin(frontmatter, relativePath) {
? `${latitude.toFixed(5)}, ${longitude.toFixed(5)}`
: "";
+ const locationName = asText(first(asArray(locationProps.name)));
const locationText = joinLocation(locality, region, country);
const timestamp = published ? Date.parse(published) || 0 : 0;
const permalink = asText(frontmatter.permalink);
@@ -367,6 +368,7 @@ function normalizeCheckin(frontmatter, relativePath) {
venueWebsiteUrl,
venueSocialUrl,
locality,
+ locationName,
region,
country,
postalCode,
diff --git a/where.njk b/where.njk
index f897660..b7f48a7 100644
--- a/where.njk
+++ b/where.njk
@@ -29,7 +29,7 @@ leafletMap: true
{% set homeSeenNames = [] %}
{% for c in checkins %}
{% if c.latitude and c.longitude %}
- {% if "Murnau" in (c.locality or "") or "Garmisch" in (c.locality or "") %}
+ {% if c.locationName == "Murnau" or c.locationName == "Garmisch-Partenkirchen" %}
{% if c.name not in homeSeenNames %}
{% set mapPoints = (mapPoints.push({name: c.name, lat: c.latitude, lng: c.longitude, url: c.venueWebsiteUrl}), mapPoints) %}
{% set homeSeenNames = (homeSeenNames.push(c.name), homeSeenNames) %}
@@ -91,7 +91,7 @@ leafletMap: true
{% else %}
{{ checkin.name }}
{% endif %}
- {% if groupItems | length > 1 and "Murnau" not in (checkin.locality or "") and "Garmisch" not in (checkin.locality or "") %}
+ {% if groupItems | length > 1 and checkin.locationName != "Murnau" and checkin.locationName != "Garmisch-Partenkirchen" %}
{{ groupItems | length }}×
{% endif %}
{% if checkin.isPrivate %}(private){% endif %}