diff --git a/.gitignore b/.gitignore index 6ad0f04..064d4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ backend/supabase/.temp/ /supabase/ # release notes pages, generated before each deploy (scripts/gen-releases.py) -/site/releases/ +/site/changelog/ # wrangler (Cloudflare Pages deploy) cache .wrangler/ diff --git a/scripts/gen-releases.py b/scripts/gen-releases.py index e92fa71..9fc7049 100644 --- a/scripts/gen-releases.py +++ b/scripts/gen-releases.py @@ -1,7 +1,8 @@ #!/usr/bin/env python3 -"""Release notes pages for the site, built from the GitHub releases. +"""The site's changelog pages, built from the GitHub releases. -Writes into site/releases/ (generated, not committed): +Writes into site/changelog/ (generated, not committed; site/_redirects sends the old +/releases/ URLs here): index.html the digest: every release, newest first, grouped by month v/index.html one page per release, with its downloads feed.xml Atom feed of recent releases @@ -32,7 +33,7 @@ SITE = "https://screenforge.studio" ROOT = Path(__file__).resolve().parent.parent SITE_DIR = ROOT / "site" -OUT = SITE_DIR / "releases" +OUT = SITE_DIR / "changelog" # commit subjects that are not changes to the app SKIP = re.compile(r"^(Release \d|Merge |Cargo\.lock|Site:|Site |CI\b|ci:|Update screencast\b|README)", re.I) # how many changes the digest shows per release before "and n more" @@ -156,8 +157,8 @@ def downloads(r): def release_page(t, r, newer, older): v, d, items = version(r), date(r), changes(r["body"]) - url = f"{SITE}/releases/v{v}/" - title = f"ScreenForge {v} release notes" + url = f"{SITE}/changelog/v{v}/" + title = f"ScreenForge {v} changelog" lis = "\n".join(f"
  • {inline(i)}
  • " for i in items) or "
  • Maintenance release: fixes and internal changes.
  • " dl = downloads(r) ld = {"@context": "https://schema.org", "@type": "SoftwareApplication", "name": "ScreenForge", "softwareVersion": v, "datePublished": d.strftime("%Y-%m-%d"), "operatingSystem": "macOS, Windows, Linux", "applicationCategory": "MultimediaApplication", "url": url, "releaseNotes": url, "downloadUrl": r["html_url"]} @@ -165,7 +166,7 @@ def release_page(t, r, newer, older): pager += f'← {version(older)}' if older else "" pager += f'{version(newer)} →' if newer else "" pager += "" - body = f"""
    Release notes
    + body = f"""
    Changelog

    ScreenForge {v}

    Released

    @@ -178,12 +179,12 @@ def release_page(t, r, newer, older): {'
    ' + ''.join(dl) + '
    ' if dl else ''}

    Or get the newest version from the download page. Every file and the full changelog are on GitHub.

    {pager}""" - extra = f'\n\n' + extra = f'\n\n' return t.page(2, url, title, f"ScreenForge {v} ({long_date(d)}): " + summary(items, 120), body, extra) def digest_page(t, releases): - url = f"{SITE}/releases/" + url = f"{SITE}/changelog/" latest = releases[0] months, order = {}, [] for r in releases: @@ -207,13 +208,13 @@ def digest_page(t, releases): {shown} {more} """) - body = f"""
    Release notes
    + body = f"""
    Changelog

    What’s new in ScreenForge

    Every update to ScreenForge, newest first. Open a version to see everything in it and download it. The app tells you when a new one is out, or you can follow updates with RSS.

    {chr(10).join(parts)}""" - extra = f'\n' + extra = f'\n' desc = f"What changed in each ScreenForge version, newest first. Latest: {version(latest)} ({long_date(date(latest))}): " + summary(changes(latest["body"]), 90) - return t.page(1, url, "ScreenForge release notes", desc, body, extra) + return t.page(1, url, "ScreenForge changelog", desc, body, extra) def feed(releases): @@ -224,18 +225,18 @@ def feed(releases): content = "" entries.append(f""" ScreenForge {v} - - {SITE}/releases/v{v}/ + + {SITE}/changelog/v{v}/ {r['published_at']} {e(summary(items, 200))} {e(content)} """) return f""" - ScreenForge releases - - - {SITE}/releases/ + ScreenForge changelog + + + {SITE}/changelog/ {releases[0]['published_at']} ScreenForge {chr(10).join(entries)} @@ -244,7 +245,7 @@ def feed(releases): def sitemap(releases): - urls = [(f"{SITE}/releases/", date(releases[0]))] + [(f"{SITE}/releases/v{version(r)}/", date(r)) for r in releases] + urls = [(f"{SITE}/changelog/", date(releases[0]))] + [(f"{SITE}/changelog/v{version(r)}/", date(r)) for r in releases] rows = "\n".join(f" {u}{d.strftime('%Y-%m-%d')}" for u, d in urls) return f'\n\n{rows}\n\n' diff --git a/scripts/site/footer.en.html b/scripts/site/footer.en.html index f69bbc4..8b7d016 100644 --- a/scripts/site/footer.en.html +++ b/scripts/site/footer.en.html @@ -6,7 +6,7 @@ compare privacy terms - releases + changelog diff --git a/scripts/site/footer.es.html b/scripts/site/footer.es.html index 55f7153..899cbe8 100644 --- a/scripts/site/footer.es.html +++ b/scripts/site/footer.es.html @@ -6,7 +6,7 @@ comparar privacidad términos - novedades + novedades diff --git a/scripts/site_partials.py b/scripts/site_partials.py index dc3ac03..57bfb46 100644 --- a/scripts/site_partials.py +++ b/scripts/site_partials.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 """The site's shared footer: one source, filled into every page. +Also the FAQPage structured data of any page with a
    , built from its questions. scripts/site/footer.en.html and footer.es.html hold the footer with links relative to the site root. Every page under site/ gets the footer of its language (pages under site/es/ the @@ -9,9 +10,15 @@ python3 scripts/site_partials.py # update the pages in place python3 scripts/site_partials.py --check # list pages whose footer differs; exit 1 if any +A page's FAQ structured data is the ', re.S) + + +def text(fragment: str) -> str: + return htmllib.unescape(re.sub(r"\s+", " ", re.sub(r"<[^>]+>", " ", fragment))).strip() + + +def faq_ld(html: str) -> str: + """The FAQPage block for the page's FAQ, or "" when it has none.""" + m = FAQ.search(html) + if not m: + return "" + entities = [ + {"@type": "Question", "name": text(q), "acceptedAnswer": {"@type": "Answer", "text": text(a)}} + for q, a in QUESTION.findall(m.group(1)) + ] + data = {"@context": "https://schema.org", "@type": "FAQPage", "mainEntity": entities} + body = json.dumps(data, ensure_ascii=False, indent=1).replace("\n{body}\n' + + def apply(page: Path, html: str) -> str: - if not FOOTER.search(html): - return html - f = footer(page) - return FOOTER.sub(lambda _: f, html, count=1) + if FOOTER.search(html): + f = footer(page) + html = FOOTER.sub(lambda _: f, html, count=1) + ld = faq_ld(html) + html = FAQ_LD.sub("", html, count=1) + if ld: + html = html.replace("\n", ld + "\n", 1) + return html def main(): @@ -61,9 +95,9 @@ def main(): page.write_text(new, encoding="utf-8") if check: for p in changed: - print(f"footer differs: {p}") + print(f"footer or FAQ data differs: {p}") sys.exit(1 if changed else 0) - print(f"footer updated on {len(changed)} page(s)") + print(f"footer and FAQ data updated on {len(changed)} page(s)") if __name__ == "__main__": diff --git a/site/404.html b/site/404.html index 11a8690..dc02c36 100644 --- a/site/404.html +++ b/site/404.html @@ -13,9 +13,11 @@ + + @@ -451,7 +453,7 @@

    Nothing on this track.

    compare privacy terms - releases + changelog
    diff --git a/site/_redirects b/site/_redirects index f3df049..a2d571c 100644 --- a/site/_redirects +++ b/site/_redirects @@ -1,2 +1,4 @@ /screen-studio-alternative /comparison 301 /screen-studio-alternative.html /comparison 301 +/releases /changelog/ 301 +/releases/* /changelog/:splat 301 diff --git a/site/comparison.html b/site/comparison.html index b4a24fb..4254704 100644 --- a/site/comparison.html +++ b/site/comparison.html @@ -3,7 +3,7 @@ -Jam vs Screen Studio vs ScreenForge — ScreenForge +Screen Studio Alternative: Jam vs Screen Studio vs ScreenForge @@ -14,14 +14,16 @@ - + + + @@ -565,7 +567,7 @@

    Sources

    compare privacy terms - releases + changelog diff --git a/site/download.html b/site/download.html index b8e22c6..eee783f 100644 --- a/site/download.html +++ b/site/download.html @@ -19,9 +19,11 @@ + + @@ -185,12 +187,12 @@ .badge .k { background: var(--panel); color: var(--dim); border-right: 1px solid var(--line-2); } .badge .v { color: var(--jade); } .badge.gold .v { color: var(--gold); } - h1 { + h1, h2.h1 { font-family: var(--display); font-weight: 900; font-size: clamp(40px, 7.4vw, 92px); line-height: .95; letter-spacing: -.045em; color: var(--white); max-width: 15ch; } - h1 em { font-style: normal; color: var(--jade); } + h1 em, h2.h1 em { font-style: normal; color: var(--jade); } .tagline { margin-top: 22px; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2.4vw, 26px); letter-spacing: -.02em; line-height: 1.25; @@ -358,9 +360,10 @@ body > main { flex: 1 0 auto; width: 100%; } .doc { max-width: 820px; margin: 0 auto; padding: 72px 28px 96px; position: relative; } .doc.wide { max-width: 1180px; } - .doc h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.02; max-width: 18ch; letter-spacing: -.04em; } + .doc h1, .doc h2.h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.02; max-width: 18ch; letter-spacing: -.04em; } .stamp { font-family: var(--mono); font-size: 12.5px; color: var(--dim); margin: 16px 0 40px; } .doc h2 { font-size: 22px; margin: 56px 0 14px; max-width: none; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; } + .doc h2.h1 { margin: 0; font-weight: 900; } .doc h2 .n { color: var(--jade-deep); font-family: var(--mono); font-size: 14px; font-weight: 400; margin-right: 10px; letter-spacing: 0; } .doc h3 { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--white); margin: 26px 0 8px; letter-spacing: -.01em; line-height: 1.3; } .doc p { margin-bottom: 15px; font-size: 15.5px; } @@ -510,7 +513,7 @@

    Install

    -

    Download ScreenForge for Linux.

    +

    Download ScreenForge for Linux.

    x86_64 · ffmpeg included · recording and editing are free

    @@ -546,7 +549,7 @@

    Install

    -

    Download ScreenForge for Windows.

    +

    Download ScreenForge for Windows.

    x86_64 · Windows 10 or later · ffmpeg included · recording and editing are free

    @@ -588,7 +591,7 @@

    Install

    compare privacy terms - releases + changelog
    diff --git a/site/es/comparison.html b/site/es/comparison.html index b8db920..07c7659 100644 --- a/site/es/comparison.html +++ b/site/es/comparison.html @@ -3,7 +3,7 @@ -Jam vs Screen Studio vs ScreenForge — ScreenForge +Alternativa a Screen Studio: Jam vs Screen Studio vs ScreenForge @@ -14,14 +14,16 @@ - + + + @@ -561,7 +563,7 @@

    Fuentes

    comparar privacidad términos - novedades + novedades diff --git a/site/es/download.html b/site/es/download.html index c5488a1..90331ac 100644 --- a/site/es/download.html +++ b/site/es/download.html @@ -19,9 +19,11 @@ + + @@ -185,12 +187,12 @@ .badge .k { background: var(--panel); color: var(--dim); border-right: 1px solid var(--line-2); } .badge .v { color: var(--jade); } .badge.gold .v { color: var(--gold); } - h1 { + h1, h2.h1 { font-family: var(--display); font-weight: 900; font-size: clamp(40px, 7.4vw, 92px); line-height: .95; letter-spacing: -.045em; color: var(--white); max-width: 15ch; } - h1 em { font-style: normal; color: var(--jade); } + h1 em, h2.h1 em { font-style: normal; color: var(--jade); } .tagline { margin-top: 22px; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2.4vw, 26px); letter-spacing: -.02em; line-height: 1.25; @@ -358,9 +360,10 @@ body > main { flex: 1 0 auto; width: 100%; } .doc { max-width: 820px; margin: 0 auto; padding: 72px 28px 96px; position: relative; } .doc.wide { max-width: 1180px; } - .doc h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.02; max-width: 18ch; letter-spacing: -.04em; } + .doc h1, .doc h2.h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.02; max-width: 18ch; letter-spacing: -.04em; } .stamp { font-family: var(--mono); font-size: 12.5px; color: var(--dim); margin: 16px 0 40px; } .doc h2 { font-size: 22px; margin: 56px 0 14px; max-width: none; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; } + .doc h2.h1 { margin: 0; font-weight: 900; } .doc h2 .n { color: var(--jade-deep); font-family: var(--mono); font-size: 14px; font-weight: 400; margin-right: 10px; letter-spacing: 0; } .doc h3 { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--white); margin: 26px 0 8px; letter-spacing: -.01em; line-height: 1.3; } .doc p { margin-bottom: 15px; font-size: 15.5px; } @@ -506,7 +509,7 @@

    Instalación

    -

    Descarga ScreenForge para Linux.

    +

    Descarga ScreenForge para Linux.

    x86_64 · ffmpeg incluido · grabar y editar es gratis

    @@ -542,7 +545,7 @@

    Instalación

    -

    Descarga ScreenForge para Windows.

    +

    Descarga ScreenForge para Windows.

    x86_64 · Windows 10 o posterior · ffmpeg incluido · grabar y editar es gratis

    @@ -584,7 +587,7 @@

    Instalación

    comparar privacidad términos - novedades + novedades
    diff --git a/site/es/index.html b/site/es/index.html index 113637c..5e2ec29 100644 --- a/site/es/index.html +++ b/site/es/index.html @@ -20,11 +20,13 @@ + + + @@ -636,7 +734,7 @@

    ¿La app envía datos a casa?

    comparar privacidad términos - novedades + novedades diff --git a/site/index.html b/site/index.html index 2424899..13fef49 100644 --- a/site/index.html +++ b/site/index.html @@ -20,11 +20,13 @@ + + + @@ -640,7 +738,7 @@

    Does the app phone home?

    compare privacy terms - releases + changelog diff --git a/site/privacy.html b/site/privacy.html index edc42f3..21d37e1 100644 --- a/site/privacy.html +++ b/site/privacy.html @@ -14,9 +14,11 @@ + + @@ -503,7 +505,7 @@

    07Changes and contact

    compare privacy terms - releases + changelog diff --git a/site/robots.txt b/site/robots.txt index efa5f68..cbd4c28 100644 --- a/site/robots.txt +++ b/site/robots.txt @@ -2,4 +2,4 @@ User-agent: * Allow: / Sitemap: https://screenforge.studio/sitemap.xml -Sitemap: https://screenforge.studio/releases/sitemap.xml +Sitemap: https://screenforge.studio/changelog/sitemap.xml diff --git a/site/success.html b/site/success.html index c2c0468..8f99616 100644 --- a/site/success.html +++ b/site/success.html @@ -13,9 +13,11 @@ + + @@ -501,7 +503,7 @@

    Anything wrong?

    compare privacy terms - releases + changelog diff --git a/site/terms.html b/site/terms.html index 8cfeb56..52d9bed 100644 --- a/site/terms.html +++ b/site/terms.html @@ -14,9 +14,11 @@ + + @@ -491,7 +493,7 @@

    10Changes and contact

    compare privacy terms - releases + changelog