fix: "home" locations not counted

This commit is contained in:
svemagie
2026-03-25 16:34:11 +01:00
parent 8783d80613
commit d4a9b1565d
2 changed files with 4 additions and 2 deletions

View File

@@ -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,

View File

@@ -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" %}
<span class="ml-2 text-xs font-normal text-surface-500 dark:text-surface-400">{{ groupItems | length }}×</span>
{% endif %}
{% if checkin.isPrivate %}<span class="ml-2 text-xs text-amber-700 dark:text-amber-400">(private)</span>{% endif %}