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 @@
-
+
-
-
+
+
-
+
-
+
-
+
+
+
+
-
+
-
+
-
+
-
+
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