Repository navigation
November 2026 release notes and automatic news previews - #375
Conversation
Deploying organicmaps with
|
| Latest commit: |
53ab764
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://efe7687f.organicmaps.pages.dev |
| Branch Preview URL: | https://release-2026-11-11.organicmaps.pages.dev |
vng
left a comment
There was a problem hiding this comment.
Review of the 2026.11.11 release post and WebP support
One blocker: extra.preview_image points at images/news/2026-11-11-release.jpg, which is not committed. Every language version of the post ships a 404 og:image, JSON-LD image and sitemap image. Details and a build-time guard are in the inline comments.
What was checked
zola build(0.23.4) andpython3 tools/test_navigation.pypass locally (7 tests); all four CI checks are green.tools/translate_check.py content/news/2026-11-11/650/: 33 clean, 0 errors, 0 warnings.- Spot-read of
ru,uk,de,fr,zh-Hans: register and glossary terms (треки, мапа, du/tu, 轨迹) are correct, and brands and attributions are intact. The other 28 translations were only machine-checked. - All 34
_index.*.mddate-section files are present. - No earlier comments or review threads exist on the PR, so there was nothing to resolve.
Findings in this PR
- Missing preview image (inline on
index.md). Blocker. loading="eager"onloop.first(inline onnews/page.html). Simplify to alwayslazy.- README wording: "Telegram media discovery also recognizes
.webpfiles" and thescreenshotsentence describe behaviour already on master, not something this PR adds. That is fine as documentation. Not verified: whether Telegram'ssendPhoto/sendMediaGroupaccepts the eight.webpfiles as photos — worth a test post to a private chat before publishing to the channels.
Pre-existing, optional (here or in separate PRs)
- No existence check for site-root
preview_image(inline onbase.html, with a tested suggestion). It would have caught finding 1. templates/news/list.html:/news/renders every image of every post with nowidth/height/loading="lazy", so the listing downloads all of them up front and shifts layout. The attributes added tonews/page.htmlwould help more there. It also usesmatching(pat="\\.mp[34]$"), whichCLAUDE.mdsays to avoid in favour ofending_with.templates/news/date_section.html: every asset is emitted as<img>, including.mp4/.mp3, and assets are not sorted, unlike the other two templates.- Preview resolution is implemented twice (
base.htmlandsitemap.xml) with slightly different rules (absolutehttpvalues). A shared macro would keep them in step, though for two call sites the duplication is tolerable.
Alternatives considered
- Dropping
extra.preview_imageand relying on the first asset: less to maintain, but the first asset is a portrait phone screenshot and auto-picked previews are not listed in the sitemap. A dedicated landscape image is better for a release post. - Testing against the real site instead of the 80-line synthetic fixture in
test_webp_images_and_previews: simpler, but it would couple the test to content. The fixture is the right trade-off.
Generated by Claude Code
| {% else %} {# Match remaining file types as images #} | ||
| {% set meta = get_image_metadata(path=media) %} | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" /> | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="{% if loop.first %}eager{% else %}lazy{% endif %}" decoding="async" /> |
There was a problem hiding this comment.
Simplification (this PR): loop.first is the first asset, not the first image, so a post with 00-video.mp4 gets no eager image. The gallery is also rendered after the whole article body, so the first image is below the fold on a post like this one and eager buys nothing. Always using lazy is simpler:
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="{% if loop.first %}eager{% else %}lazy{% endif %}" decoding="async" /> | |
| `` <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path ``|```` safe }}{{ media ````|````` split(pat='/') `````|`````` last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="lazy" decoding="async" /> `````` |
The new width/height attributes are safe: the global img { height: auto } rule keeps the aspect ratio under the max-width/max-height limits.
Minor, optional:
base.htmlnow detects extensions case-insensitively, but lines 25 and 29 still match.mp4/.mp3case-sensitively. Aclip.MP4would be passed toget_image_metadataand stop the build, which is at least loud.- Pre-existing: the images have no
alt.alt=""at minimum stops screen readers announcing the file URL. test_webp_images_and_previewsdoes not assert the newwidth/height/loadingattributes on the post page.
Generated by Claude Code
There was a problem hiding this comment.
Do not apply the suggestion block above with the "Commit suggestion" button: its content was mangled by escaping (<img, stray backticks) and would replace the <img> tag with broken markup. The intended change is only loading="{% if loop.first %}eager{% else %}lazy{% endif %}" → loading="lazy" on this line.
Two review runs overlapped on this PR, so the missing preview image, the build-time check and this line each have two threads saying the same thing; the duplicates can be resolved together.
Generated by Claude Code
| {% else %} {# Match remaining file types as images #} | ||
| {% set meta = get_image_metadata(path=media) %} | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" /> | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="{% if loop.first %}eager{% else %}lazy{% endif %}" decoding="async" /> |
There was a problem hiding this comment.
The new attributes render correctly: I measured all 8 images at 390px and 1280px viewports and none is distorted, because the global img { height: auto } overrides the height attribute.
Two optional follow-ups:
- Simplification (this PR):
loop.firstrefers to the first asset, so a post that starts with an.mp4gets no eager image, and on a release post the images sit below the whole article anyway. A plainloading="lazy"is simpler and behaves the same in practice. - Pre-existing, separate PR or here: the page that needs this most did not get it.
templates/news/list.html(line 49) renders 198<img>tags on/news/in every language with nowidth/heightand no lazy loading, so all of them download eagerly and shift layout. The same attributes can be copied there as is.templates/news/date_section.html(line 16) also has no media filter and emitsˋ<img src="….mp4">ˋfor posts with video, e.g./news/2024-03-11/.
Generated by Claude Code
vng
left a comment
There was a problem hiding this comment.
Review of f2f0a76
One blocker: the post's extra.preview_image points at static/images/news/2026-11-11-release.jpg, which is not in the repo, so og:image, JSON-LD and 34 sitemap entries are 404s. Everything else is optional or polish.
Checked locally with Zola 0.23.4: zola build passes, python3 tools/test_navigation.py passes (7 tests), translate_check.py on the post is clean (33 translations), CI is green. npm test was not run (the requests module is missing in my environment). No earlier review threads exist, so there was nothing to resolve.
New in this PR
| # | Finding | Where |
|---|---|---|
| 1 | Blocker: preview JPEG missing from the repo | index*.md:8 (inline) |
| 2 | Slug is the English one in all 34 files; the last three release posts localized it. Decide before the URL is published | index.md:4 (inline) |
| 3 | First image is loading="eager" although it sits below the whole article; make all lazy |
news/page.html:32 (inline, suggestion) |
| 4 | Test does not assert the new width/height/loading attributes and depends on an unrelated 2023 post's image |
test_navigation.py (inline) |
| 5 | WebP-only media has not been through the Telegram album path before; try a test channel first (not verified from here) | README.md (inline) |
| 6 | Translation defects, 21 inline suggestions: uk ×2, pl ×3, cs, lt, el ×2 (+ line 104), tr (+ te:83), de, nl ×3 (+ line 120), af, cy, fr ×2, id, fa-IR, ru |
inline |
| 7 | Commit title "Webp images support" overstates the change: WebP already rendered and was already a preview candidate. What changed is the preview picker (first image, skips video, case-insensitive) and the <img> attributes. The PR also has no description |
commit f2f0a76 |
Lower-confidence translation notes, not posted inline:
helines 11, 44, 100, 103 use «הקלטת מסלול GPS» where the glossary has «הקלטת מסלול» for "track recording".zh-Hans:11uses 轨迹记录; the glossary has 轨迹录制.hi:126ends with a Latin full stop instead of a danda.ar:130«فريق Organic Maps الخاص بك» is a calque; the earlier post signs «فريقك في Organic Maps».pt:92"atualizam" → "são atualizadas".cs:42"samostatné body" loses "waypoints".uk:23"пересихаючих" anduk:124"місцеположення" are non-standard forms.nl:15"Uitgaveopmerkingen" is a calque; an earlier post uses "Versie-informatie".fr/cylines 80 and 104 drop "route" from "route point".sv es it ca gl oc pt-BR eu ja et hu mr mlhad no findings worth posting.
Pre-existing, fixable here or in a separate PR
| # | Finding | Where |
|---|---|---|
| 8 | Fail-fast: one get_image_metadata(path=preview_image) call makes the build fail on a missing site-root preview; it would have caught #1. Validated against the whole site |
base.html (inline) |
| 9 | news/list.html and news/date_section.html did not get dimensions or lazy loading; /news/ loads 198 images and 11 videos eagerly |
page.html:32 (inline) |
| 10 | Bug: date_section.html renders .mp4 assets as <img> (visible on /news/2026-09-29/) |
page.html:32 (inline) |
Simplification / alternative
- One shared media include for
page.html,list.htmlanddate_section.htmlfixes #9 and #10 and removes three diverging copies of the loop (they already disagree:ending_withvsmatching, sorted vs unsorted, with vs without video).- Pro: one place for extension rules and image attributes.
- Con:
list.htmlneeds the landscape pre-scan kept outside the include, and the path variable differs (resource_pathvspage.path), so it must be passed in.
- The
base.htmlpicker loop is as simple as Tera allows; no change proposed. - The new image attributes cause no layout regression: all 198 news images measured undistorted at 375 px and 1280 px.
Generated by Claude Code
| --- | ||
| title: "Organic Maps November 2026 update: 3D terrain, ocean depths, imported areas, and route reversal" | ||
| date: 2026-11-11 | ||
| slug: "3d-terrain-hillshading-ocean-depths-imported-area-polygons-on-the-map-route-reversal-november-2026" |
There was a problem hiding this comment.
Decide before merge (new in this PR): all 34 files share the English slug. The previous release posts localize it per language — 2026-07-23, 2026-08-31 and 2026-09-29 each have one distinct slug per file (e.g. ibilbidearen-optimizazioa-…-iraila-2026 for eu). Only the 12M-installs announcement (2026-11-03) used a single slug.
Slugs are published URLs and cannot be changed after release without aliases/redirects, so if localized slugs are still the convention for release notes, they need to go in now.
Generated by Claude Code
| {% else %} {# Match remaining file types as images #} | ||
| {% set meta = get_image_metadata(path=media) %} | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" /> | ||
| <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="{% if loop.first %}eager{% else %}lazy{% endif %}" decoding="async" /> |
There was a problem hiding this comment.
Three points on this line:
-
Simplification: the images come after the whole article body (100+ bullets in this post), so the first one is never above the fold.
loading="lazy"for all of them is simpler and avoids an eager ~120 KB download; alsoloop.firstis the first asset, which may be the.mp4.Suggested change<img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path | safe }}{{ media | split(pat='/') | last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="{% if loop.first %}eager{% else %}lazy{% endif %}" decoding="async" /> `` <img class="news_image{% if meta.width > meta.height %}_landscape{% endif %}" src="{{ resource_path ``|```` safe }}{{ media ````|````` split(pat='/') `````|`````` last }}" width="{{ meta.width }}" height="{{ meta.height }}" loading="lazy" decoding="async" /> `````` -
Completeness (pre-existing, optional here): the same
<img>intemplates/news/list.htmlandtemplates/news/date_section.htmldid not getwidth/height/loading./news/is where it matters most: the built page has 198 images and 11 videos, all loaded eagerly and without reserved space. Moving the media loop into one shared include (e.g.templates/news/_media.html) used by all three templates would fix this and remove the triplicated logic. -
Pre-existing bug, separate PR is fine:
date_section.htmlhas no audio/video branch, so/news/2026-09-29/rendersˋ<img class="news_image" src="…/01-android-route-point-shortcuts-demo.mp4" />ˋ. The shared include fixes that too.
No layout regression from the new attributes: I measured all 198 news images at 375 px and 1280 px viewports and none is distorted (global img { height: auto } keeps the ratio).
Generated by Claude Code
vng
left a comment
There was a problem hiding this comment.
Some better naming for the imported area in RU?
"зона, область" - are confused.
Select the first supported image in sorted assets, including mixed-case extensions, instead of falling back when a video comes first. Reserve article image dimensions, add loading and decoding hints, and serve JPEG/WebP correctly in browser tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
f2f0a76 to
b36a8d1
Compare
vng
left a comment
There was a problem hiding this comment.
Re-review of b36a8d1
No blockers. The earlier blocker is fixed: the cover is committed as content/news/2026-11-11/650-preview.jpg (1200×630) and all 34 language versions emit it in og:image, JSON-LD and the sitemap.
Checked locally with Zola 0.23.4: zola build passes, python3 tools/test_navigation.py passes (7 tests), translate_check.py on the post reports 33 clean, and all four CI checks are green. Build time is unchanged against master. npm test and the browser suite were not run.
Resolved
28 earlier threads are fixed by the new commits and are now resolved:
- the missing preview image (3 threads) and the build-time existence check (3 threads);
- the test gap on
width/height/loadingand the dependency on a 2023 post's image; - the
CLAUDE.mdpreview wording; - all 21 translation suggestions.
@vng's question about the Russian wording for imported areas is also addressed: ru and uk now use «полигоны» / «полігони» instead of «зона» / «область», and the other languages use the matching term.
Still open from the earlier review
| # | Finding | Thread |
|---|---|---|
| 1 | Decide before merge: all 34 files share the English slug, while the July, August and September release posts localized it. It cannot be changed after publication without redirects | index.md:4 |
| 2 | First gallery image is loading="eager" although it sits below 100+ bullets; loop.first is also the first asset, not the first image. Plain lazy is simpler |
news/page.html:32 (3 duplicate threads) |
| 3 | The post's media is WebP only; the Telegram album path has not been confirmed to accept it as photos. Worth one test post before publishing | README.md |
| 4 | Pre-existing, separate PR is fine: news/list.html and news/date_section.html have no image dimensions or lazy loading, and date_section.html renders .mp4 as <img> |
news/page.html:32 |
New in this round (all optional, inline)
| # | Finding | Where |
|---|---|---|
| 5 | The parent-cover lookup can be 5 lines with get_image_metadata(..., allow_missing=true); trade-off is case-insensitive filesystems |
_news_preview.html |
| 6 | Alternative: an explicit preview_image: news/2026-11-11/650-preview.jpg needs no component and no sitemap pre-pass; trade-off is one YAML block per translation |
sitemap.xml |
| 7 | The http branches in sitemap.xml:36 and _jsonld_news.html:5 are unreachable now that an absolute preview URL stops the build |
base.html:131 |
Not inline:
- The PR has no description. One line saying it carries the release post plus the preview-cover convention would help reviewers.
test_webp_images_and_previewsnow also covers parent covers, explicit-preview validation and the sitemap, so the name is narrower than the test.
Generated by Claude Code
| {%- set folder = source_dir | trim_end(pat="/") -%} | ||
| {%- set article_id = folder | split(pat="/") | last -%} | ||
| {%- set parent_dir = folder | trim_end(pat=article_id) -%} | ||
| {%- set filename = article_id ~ "-preview.jpg" -%} | ||
| {%- set parent = get_section(path=parent_dir ~ "_index.md", lang=default_language, allow_missing=true) -%} | ||
| {%- if parent -%} | ||
| {%- for asset in parent.assets -%} | ||
| {%- if asset | split(pat="/") | last == filename -%} | ||
| {%- set _preview_exists = get_image_metadata(path=asset) -%} | ||
| {{- parent.path ~ (filename | urlencode) -}} | ||
| {%- break -%} | ||
| {%- endif -%} | ||
| {%- endfor -%} | ||
| {%- endif -%} |
There was a problem hiding this comment.
Simplification (this PR, optional): get_image_metadata accepts allow_missing=true, so the section lookup and the asset loop are not needed. The whole body can be:
{%- if source_dir and source_file is starting_with(pat="news/") -%}
{%- set cover = (source_dir | trim_end(pat="/")) ~ "-preview.jpg" -%}
{%- if get_image_metadata(path=cover, allow_missing=true) -%}
{{- "/" ~ cover -}}
{%- endif -%}
{%- endif -%}
Validated with Zola 0.23.4: the real site produces the same og:image in every language and the same 34 sitemap entries, and all 7 tests in tools/test_navigation.py pass, including the corrupt-cover case (a present but undecodable file still stops the build).
- Pro: 14 lines fewer, no
get_sectioncall, and thedefault_languageargument can be dropped from the component and both callers. - Con: on a case-insensitive filesystem (macOS)
650-preview.JPGwould be accepted locally and then 404 on the Linux deployment. The current loop compares the listed filename exactly, which theauto-preview.JPGtest case guards. I could only run this on Linux, so that case is reasoned, not tested.
Generated by Claude Code
| {# Sitemap entries lack source paths. Index parent covers from the canonical | ||
| news inventory once, including each post's translated permalinks. #} | ||
| {%- set_global parent_previews = [] -%} | ||
| {%- set news = get_section(path="news/_index.md", lang=config.default_language, allow_missing=true) -%} | ||
| {%- if news -%} | ||
| {%- for section_path in news.subsections -%} | ||
| {%- set dated = get_section(path=section_path, lang=config.default_language) -%} | ||
| {%- for post in dated.pages -%} | ||
| {%- set image = <news_parent_preview resource={post} default_language={config.default_language} /> -%} | ||
| {%- if image -%} | ||
| {%- set_global parent_previews = [...parent_previews, {"permalink": post.permalink, "image": image}] -%} | ||
| {%- for translation in post.translations -%} | ||
| {%- if translation.permalink != post.permalink -%} | ||
| {%- set_global parent_previews = [...parent_previews, {"permalink": translation.permalink, "image": image}] -%} | ||
| {%- endif -%} | ||
| {%- endfor -%} | ||
| {%- endif -%} | ||
| {%- endfor -%} | ||
| {%- endfor -%} | ||
| {%- endif -%} | ||
| {%- set parent_previews = parent_previews | group_by(attribute="permalink") -%} |
There was a problem hiding this comment.
Alternative (this PR, optional): keep the cover in the parent folder but name it explicitly. Adding
extra:
preview_image: news/2026-11-11/650-preview.jpgto index.md gives the same result with no new template code. I checked it on this branch with the component unused: og:image, JSON-LD image and the sitemap ˋ<image:loc>ˋ all come out as https://organicmaps.app/news/2026-11-11/650-preview.jpg, through the explicit branches that already exist, and the new build-time check covers a wrong path.
- Pro: removes
_news_preview.html, this 21-line pre-pass, theelsebranch below and roughly half of the new test. It is also what the last three release posts do (an explicitpreview_imagein all 34 files), andtranslate_md.pycopiesextra:verbatim, so translations get the line for free. - Con: one YAML block in each of the 34 files, and a translation that loses it falls back silently to the first portrait screenshot. The convention in this PR cannot drift that way.
If the convention stays, this pre-pass is correct as written: every dated folder has a default-language index.md, so no translated post is missed, and the build time is unchanged against master (about 2 to 5 s in both).
For information, in either variant Zola copies the cover into every language's section folder: the build has 34 copies of 650-preview.jpg (about 6 MB) and only /news/2026-11-11/650-preview.jpg is referenced. Only a file under static/ avoids that.
Generated by Claude Code
Use <article-folder>-preview.jpg in the parent date folder before falling back to article images, sharing the cover across translated slugs and sitemap entries. Validate explicit local previews and cover precedence, missing files and image attributes in self-contained regression tests. Signed-off-by: Alexander Borsuk <me@alex.bio>
Describe terrain and ocean-depth support, imported areas, route reversal, track improvements and platform fixes. Include eight optimized screenshots and the landscape sharing cover. Signed-off-by: Alexander Borsuk <me@alex.bio>
Include proofread release translations and date sections. Localize their slugs, retain the previous URLs as redirect aliases, and point translators to the shared polygon terminology. Signed-off-by: Alexander Borsuk <me@alex.bio>
b36a8d1 to
53ab764
Compare
Add the November 2026 release notes in 34 languages, eight optimized screenshots, and a landscape sharing cover.
News metadata and the sitemap automatically discover parent-folder covers while honoring explicit overrides. Validate local preview files and resolve local paths consistently, including names beginning with
http.Localize the 33 translated slugs and retain the previous URLs as redirect aliases. The English permalink is preserved.
Validation: