From 45f8ae54fc171836e4c54e76bf324c74f80ee136 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 16 Nov 2026 19:24:23 +0000 Subject: [PATCH] docs: refresh landing badges and add OpenGraph/meta description tags - Replace the stale "budget $201/mo from 40 supporters" badge with the README's Support ActivityWatch Pro and Donate one-off badges - Point the build badge at release.yml (test.yml renders "no status") - Add alt text to every badge and use https for the docs link - Add sphinxext-opengraph so pages get og:* and tags; give the index page a hand-written description Git-Session-Id: 3be6034a-bbf1-4284-84b6-b543c09d9004 --- poetry.lock | 23 +++++++++++++++++++++-- pyproject.toml | 1 + src/badges.rst | 23 +++++++++++++---------- src/conf.py | 8 ++++++++ src/index.rst | 5 +++++ 5 files changed, 48 insertions(+), 12 deletions(-) diff --git a/poetry.lock b/poetry.lock index 4e8af51..b7a43d2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand. [[package]] name = "accessible-pygments" @@ -1380,6 +1380,25 @@ lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] +[[package]] +name = "sphinxext-opengraph" +version = "0.13.0" +description = "Sphinx Extension to enable OGP support" +optional = false +python-versions = ">=3.9" +groups = ["main"] +files = [ + {file = "sphinxext_opengraph-0.13.0-py3-none-any.whl", hash = "sha256:936c07828edc9ad9a7b07908b29596dc84ed0b3ceaa77acdf51282d232d4d80e"}, + {file = "sphinxext_opengraph-0.13.0.tar.gz", hash = "sha256:103335d08567ad8468faf1425f575e3b698e9621f9323949a6c8b96d9793e80b"}, +] + +[package.dependencies] +Sphinx = ">=6.0" + +[package.extras] +rtd = ["furo (>=2024)", "sphinx (>=8.1.0,<8.2.0)", "sphinx-design"] +social-cards = ["matplotlib (>=3)"] + [[package]] name = "sphinxext-rediraffe" version = "0.2.7" @@ -1517,4 +1536,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.1" python-versions = "^3.11" -content-hash = "f75a8fb303f665aaa11a79c8be4929406c1dc01b8a46492a85436ab58f0a1aa0" +content-hash = "2fcbe7bc3fbb9932a86eae9e3cc7a6d29aa257357be19a016cd1ca757fcaf0a1" diff --git a/pyproject.toml b/pyproject.toml index a039005..ea2de74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ sphinx-tabs = "^3.4" sphinx-click = ">=6.0" myst-parser = ">=2.0" sphinxext-rediraffe = "^0.2.7" +sphinxext-opengraph = ">=0.9" [build-system] requires = ["poetry-core"] diff --git a/src/badges.rst b/src/badges.rst index 711803e..3b52de7 100644 --- a/src/badges.rst +++ b/src/badges.rst @@ -20,40 +20,43 @@
- + Build status - - + + Documentation status
- + Latest release - + Total downloads - + Discord
+ + Support ActivityWatch Pro + - + Donate one-off - + DOI 10.5281/zenodo.4957165
- + Follow @ActivityWatchIt - + Star on GitHub
diff --git a/src/conf.py b/src/conf.py index f63a3c0..a1415ad 100644 --- a/src/conf.py +++ b/src/conf.py @@ -42,6 +42,7 @@ "sphinx_click", "sphinxext.rediraffe", "sphinxcontrib.jquery", + "sphinxext.opengraph", ] extlinks = { @@ -82,6 +83,13 @@ copyright = f"2016-{date.today().year} {author_copyright}" description_short = "The free and open source automated time-tracker" +# OpenGraph and tags for link previews. +# On Read the Docs, og:url is derived from READTHEDOCS_CANONICAL_URL. +ogp_site_name = project +ogp_image = "https://activitywatch.net/img/banner.png" +ogp_image_alt = f"{project}: {description_short}" +ogp_social_cards = {"enable": False} + # TODO: Automatically detect version (possibly using git tags) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the diff --git a/src/index.rst b/src/index.rst index 429dbe8..c6bdb63 100644 --- a/src/index.rst +++ b/src/index.rst @@ -1,3 +1,8 @@ +:og:description: Documentation for ActivityWatch, the free and open source automated time-tracker: installation, configuration, watchers, syncing, the REST API and more. + +.. meta:: + :description: Documentation for ActivityWatch, the free and open source automated time-tracker: installation, configuration, watchers, syncing, the REST API and more. + .. image:: ../media/banners/banner.png .. include:: badges.rst