gdpr

WeMystic policies

Legal texts (terms and conditions, privacy policies, cookie policies, partner lists and consent disclosures) served from legal.wemystic.net and consumed by frontend JavaScript.

How content is authored

The served files are JSON documents with the shape {"title": "...", "content": "<html>"}. Editing escaped HTML inside JSON is error prone, so each text is written as a Markdown file and the JSON is generated from it.

flowchart LR
    MD["termsandconditions/udeals-wemystic-pt-partners-phone.md<br/>(front matter + Markdown)"] -->|tools/markdown_to_json.py| JSON["termsandconditions/udeals-wemystic-pt-partners-phone<br/>(JSON, no extension)"]
    JSON -->|fetched by| FE[Frontend JavaScript]

A Markdown source looks like this:

---
title: WEMYSTIC PT uDeals Partners Phone
---

Body in **Markdown**. Raw HTML is allowed.

Files that must keep a .json extension (the language folders) use a double extension: en/privacypolicy.json.md generates en/privacypolicy.json. Files in termsandconditions/, privacypolicy/, cookiespolicy/ and disclosure/ have no extension, so their sources are plain name.md.

Generating the JSON

pip install python-frontmatter markdown-it-py
python3 tools/markdown_to_json.py

The script processes every *.md file under the repository root (except README.md) and overwrites the matching JSON file. Always edit the .md, never the generated JSON.

Note that the output is re-rendered from Markdown, so regenerated JSON can differ slightly from older hand-made JSON (for example <strong> instead of <b>) even when the text is unchanged.

Repository layout

Per-site policy documents (.md source + generated JSON)

File names follow udeals-<brand>-<lang>[-partners][-variant], or vid-<lang> / wemystic-com-wemystic for older ones.

Directory Content
termsandconditions/ Terms and conditions. Suffix -partners is the partners variant, -phone adds the phone and SMS wording. Includes the nikita-adc, chris-montra, telemac, cosmospace, doublesens and vid brands.
privacypolicy/ Privacy policies, same naming.
cookiespolicy/ Cookie policies, same naming.
disclosure/ Consent checkbox text. The udeals-wemystic-en and udeals-wemystic-en-partners files are {title, content} JSON, the others are plain HTML snippets (wemystic-<lang>-udeals[-partners]) with no Markdown source.

Per-language folders (de, en, es, fr, it, pt)

File Purpose
index.html Landing page of the language. Loads data.json and shows the terms in a modal.
data.json Hand-edited (no Markdown source). Page configuration: links, the tc.url of the terms to load and the contacts HTML.
termsandconditions.json, privacypolicy.json, cookiespolicy.json, partners.json Generic {title, content} documents for the language. Each has a .json.md source next to it.
cookies.html, cookiesdisclosure-*.html, cookiespolicy.html Cookie banner and disclosure snippets (several versions, including gcmv2).
wemystic.html, partners.html Consent checkbox snippets linking to the documents above.

Extra files exist for some languages: de/impressum.*, en/contact.json, en/legalmentions.json, en/personaldata.json, en/partners-telemac.json, fr/partners-cosmospace.json, pt/cookiesdisclosure.*.

Other files

Path Purpose
country_lang_map.json Hand-edited. Country code to language code map.
disclosure_map.json Hand-edited. WordPress style export (id, slug, title.rendered, content.rendered) of the disclosure texts.
assets/ Fonts, images and Twig templates (assets/twig/) used by the pages and the cookie policy dialog.
tools/markdown_to_json.py Markdown to JSON converter described above.
CNAME GitHub Pages domain (legal.wemystic.net).