Skip to content

SEO fixes#341

Open
biodranik wants to merge 10 commits into
masterfrom
ab/seo
Open

SEO fixes#341
biodranik wants to merge 10 commits into
masterfrom
ab/seo

Conversation

@biodranik
Copy link
Copy Markdown
Member

No description provided.

biodranik added 6 commits May 23, 2026 14:01
Emits self-referencing rel="alternate" hreflang links plus x-default
in <head> for every page that has translations, following Google's
recommended pattern. Lets search engines map equivalent pages across
30+ languages and stop treating them as duplicates of the EN URL.
Adds {% block og_type %} and {% block article_meta %} extension points
in base.html, overridden in news/page.html to set og:type=article,
article:author=Organic Maps, and article:section from the news
taxonomy. Other page types keep og:type=website.
Drops maximum-scale=1.0 and user-scalable=no. These are flagged by
Lighthouse a11y audits and feed into Google's page-experience signal.
Site has no text inputs, so the iOS auto-zoom-on-focus quirk doesn't
apply.
FAQ category pages (/faq/app/, /faq/map/, ...) and news section pages
(/news/releases/, /news/press/) used to render <title>App</title>,
no description, and start the body with <h2>. They now render:

  title:       App – Help – Organic Maps
  description: Frequently asked questions about App in Organic Maps.
  h1:          App – Help

The title/description are computed in base.html from the term name,
the section label (faq-menu-title or news section's menu_title), and
two new translation keys (faq-term-description, news-term-description)
added for all 33 supported languages.

Also bumps FAQ list page heading hierarchy from H1→H3 to H1→H2.
* Homepage gets Organization + MobileApplication schema (drives the
  Google brand knowledge panel, links app store badges and social
  profiles).
* FAQ answer pages get FAQPage (question/answer) + BreadcrumbList
  (Help > Category > Question, fully localized).
* News posts get NewsArticle with publisher, dates, image and main
  entity (Top Stories / Discover eligibility).

Each page type uses its own partial in templates/_jsonld_*.html and is
included via the article_meta block. Homepage schema is gated on
{% if section %} so other pages in the root section that reuse
templates/index.html (donate, contribute, privacy, terms) don't
incorrectly inherit it.
Adds the xmlns:image namespace and emits <image:image> for pages that
declare extra.preview_image in their frontmatter (covers donate,
contribute, and any news post that opts in). Preserves the existing
<lastmod> behavior.

Sitemap-level hreflang would also be ideal but Zola's sitemap context
exposes only permalink/updated/extra per entry, with no access to
page.translations or a path that could be used to call get_page().
Cross-language alternates are emitted as in-page <link rel="alternate"
hreflang> on every page already (see Add hreflang annotations commit),
which is Google's primary signal.
@biodranik biodranik requested review from strump and vng May 23, 2026 23:09
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 23, 2026

Deploying organicmaps with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3a58b60
Status: ✅  Deploy successful!
Preview URL: https://35a4c610.organicmaps.pages.dev
Branch Preview URL: https://ab-seo.organicmaps.pages.dev

View logs

biodranik added 4 commits May 24, 2026 01:26
* screenshot shortcode pulls width/height from the actual image via
  get_image_metadata, defaults to loading="lazy" and decoding="async",
  with optional loading/fetchpriority overrides per call.
* The first hero screenshot on every localized homepage is now
  loading="eager" fetchpriority="high" so the LCP image isn't
  deferred.
* App-store badges, donate buttons, and privacy screenshots get
  explicit width/height plus loading="lazy" decoding="async".
* Badges also gain meaningful alt text from the existing
  install-{appstore,googleplay,appgallery,fdroid} translation keys
  (previously they had alt="").

Fixes the worst Core Web Vitals offenders (CLS from un-sized images,
discretionary network for below-fold images) and improves a11y on the
download CTAs.
Six lightweight DNS-only hints in <head>: apps.apple.com,
play.google.com, github.com, appgallery.huawei.com, f-droid.org,
donate.organicmaps.app. Trims the first-click latency for users tapping
the store badges or donate flow without burning sockets on every
external link.
The bare three-line 404 left users without a way back. The new page
extends the regular site header/footer and offers a short list of
landing pages (Home, Help, News, Donate, Contribute) plus a link to
report a broken site link. Page is marked noindex.

Implemented as a standalone template that stubs resource_path and
resource so the top_menu/bottom_menu partials render without the usual
page/section/term context.
/faq/{category}/ and /news/{section}/ pages had no hreflang, no
language menu, and an empty JS pageTranslations map because Zola's
term resource exposes no .translations field.

Base.html now derives a per-language term URL list by inspecting the
first page in the term: that page's translations point to each
per-language version, and each per-language version declares its
taxonomy slug in its own frontmatter (which is the localized term
slug). Built as parallel arrays since Tera has no inline dict literal.

The derived data feeds three places:
  * <link rel="alternate" hreflang> in base.html
  * The language dropdown in language_selector.html
  * The pageTranslations map in language_redirect.html

Each FAQ term page now ships 34 hreflang entries (33 langs + x-default)
plus 32 language menu items linking to the correctly-localized slug
(/it/faq/applicazione/, /ru/faq/приложение/, /pl/faq/aplikacja/, etc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant