diff --git a/web/src/padelnomics/admin/routes.py b/web/src/padelnomics/admin/routes.py index 8788711..551b1c4 100644 --- a/web/src/padelnomics/admin/routes.py +++ b/web/src/padelnomics/admin/routes.py @@ -2248,9 +2248,6 @@ async def _sync_static_articles() -> None: if existing and existing["updated_at"] and existing["updated_at"] >= file_mtime_iso: continue - body_md = raw[m.end():] - body_html = mistune.html(body_md) - title = fm.get("title", slug) url_path = fm.get("url_path", f"/{slug}") language = fm.get("language", "en") @@ -2261,19 +2258,18 @@ async def _sync_static_articles() -> None: await execute( """INSERT INTO articles - (slug, title, url_path, language, meta_description, body_html, + (slug, title, url_path, language, meta_description, status, template_slug, group_key, created_at, updated_at) - VALUES (?, ?, ?, ?, ?, ?, 'draft', ?, ?, ?, ?) + VALUES (?, ?, ?, ?, ?, 'draft', ?, ?, ?, ?) ON CONFLICT(slug) DO UPDATE SET - title = excluded.title, - url_path = excluded.url_path, - language = excluded.language, + title = excluded.title, + url_path = excluded.url_path, + language = excluded.language, meta_description = excluded.meta_description, - body_html = excluded.body_html, - template_slug = excluded.template_slug, - group_key = excluded.group_key, - updated_at = excluded.updated_at""", - (slug, title, url_path, language, meta_description, body_html, + template_slug = excluded.template_slug, + group_key = excluded.group_key, + updated_at = excluded.updated_at""", + (slug, title, url_path, language, meta_description, template_slug, group_key, now_iso, now_iso), ) diff --git a/web/src/padelnomics/locales/de.json b/web/src/padelnomics/locales/de.json index e5f9440..12bd119 100644 --- a/web/src/padelnomics/locales/de.json +++ b/web/src/padelnomics/locales/de.json @@ -1754,13 +1754,9 @@ "report_q1_meta_description": "77.355 Padelplätze weltweit, +29 % in 18 Monaten. Der umfassendste unabhängige Marktbericht zum globalen Padelmarkt — FIP, Playtomic/PwC und die Padelnomics-Datenpipeline.", "report_q1_subtitle": "Das vollständigste unabhängige Bild des globalen Padelmarkts — Daten aus FIP, Playtomic/PwC und der Padelnomics-Pipeline mit 12.441 Standorten in 80 Ländern.", "report_q1_stat1_label": "Plätze weltweit", - "report_q1_stat1_unit": "", "report_q1_stat2_label": "Wachstum in 18 Monaten", - "report_q1_stat2_unit": "", "report_q1_stat3_label": "Erfasste Länder", - "report_q1_stat3_unit": "", "report_q1_stat4_label": "Venues im Datensatz", - "report_q1_stat4_unit": "", "report_q1_toc_heading": "Im Bericht", "report_q1_toc_1": "Globaler Überblick: Plätze, Spieler, Verbände", "report_q1_toc_2": "Europa: eine ungleich verteilte Karte", diff --git a/web/src/padelnomics/locales/en.json b/web/src/padelnomics/locales/en.json index 7360a55..b5ee39f 100644 --- a/web/src/padelnomics/locales/en.json +++ b/web/src/padelnomics/locales/en.json @@ -1757,13 +1757,9 @@ "report_q1_meta_description": "77,355 padel courts worldwide, +29% in 18 months. The most complete independent market report on global padel — FIP, Playtomic/PwC, and the Padelnomics data pipeline.", "report_q1_subtitle": "The most complete independent picture of the global padel market — synthesising data from FIP, Playtomic/PwC, and the Padelnomics pipeline of 12,441 venues across 80 countries.", "report_q1_stat1_label": "Courts worldwide", - "report_q1_stat1_unit": "", "report_q1_stat2_label": "Growth in 18 months", - "report_q1_stat2_unit": "", "report_q1_stat3_label": "Countries tracked", - "report_q1_stat3_unit": "", "report_q1_stat4_label": "Venues in pipeline", - "report_q1_stat4_unit": "", "report_q1_toc_heading": "What's inside", "report_q1_toc_1": "Global snapshot: courts, players, federations", "report_q1_toc_2": "Europe: the uneven map", diff --git a/web/src/padelnomics/migrations/versions/0020_articles_unique_url_language.py b/web/src/padelnomics/migrations/versions/0020_articles_unique_url_language.py index 0cda8d6..dabbb91 100644 --- a/web/src/padelnomics/migrations/versions/0020_articles_unique_url_language.py +++ b/web/src/padelnomics/migrations/versions/0020_articles_unique_url_language.py @@ -31,6 +31,7 @@ def up(conn) -> None: seo_head TEXT, created_at TEXT NOT NULL DEFAULT (datetime('now')), updated_at TEXT, + group_key TEXT DEFAULT NULL, UNIQUE(url_path, language) ) """) @@ -38,10 +39,10 @@ def up(conn) -> None: INSERT INTO articles_new (id, url_path, slug, title, meta_description, country, region, og_image_url, status, published_at, template_slug, language, - date_modified, seo_head, created_at, updated_at) + date_modified, seo_head, created_at, updated_at, group_key) SELECT id, url_path, slug, title, meta_description, country, region, og_image_url, status, published_at, template_slug, language, - date_modified, seo_head, created_at, updated_at + date_modified, seo_head, created_at, updated_at, group_key FROM articles """) conn.execute("DROP TABLE articles") diff --git a/web/src/padelnomics/reports/templates/reports/report_landing.html b/web/src/padelnomics/reports/templates/reports/report_landing.html index 7ef2351..1cea7d0 100644 --- a/web/src/padelnomics/reports/templates/reports/report_landing.html +++ b/web/src/padelnomics/reports/templates/reports/report_landing.html @@ -27,19 +27,19 @@