From 05675299608ec02098b193df494f6ea86bea637e Mon Sep 17 00:00:00 2001 From: AnnMarueW Date: Fri, 2 Oct 2026 13:19:01 -0700 Subject: [PATCH 1/2] Add changelog for #4024 and update register_page docstrings --- CHANGELOG.md | 1 + dash/_pages.py | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fb24b979c..0ab4b458f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] ### Added +- [#4024](https://github.com/plotly/dash/pull/4024) Add support for social media meta tags in regular Dash apps using `app.title`, `app.description`, and `app.image`. - [#3976](https://github.com/plotly/dash/pull/3976) Add a new `scrollToTop` prop to `dcc.Link` to control whether the page scrolls to the top after client-side navigation. It defaults to `True` to preserve the existing behavior. Fixes [#3974](https://github.com/plotly/dash/issues/3974). - [#3947](https://github.com/plotly/dash/pull/3947) Make `plotly-cloud` a default install dependency of Dash instead of an optional extra, so the `plotly` CLI and Dash's cloud integration work out of the box. The `dash[cloud]` extra is kept for backward compatibility. - [#3930](https://github.com/plotly/dash/pull/3930) Add shared storage: a backend-agnostic cross-process state manager (key/value with optional TTL, plus ordered replayable pub/sub) on every app via `dash.ctx.shared_storage`, started lazily and disabled with `shared_storage=None`. Ships `LocalSharedStorage` (default, in-memory with optional disk persistence), `DiskcacheSharedStorage`, and `RedisSharedStorage` for horizontally-scaled deployments; see `.ai/ARCHITECTURE.md`. diff --git a/dash/_pages.py b/dash/_pages.py index 8eaa258d75..8f1ca85114 100644 --- a/dash/_pages.py +++ b/dash/_pages.py @@ -220,26 +220,28 @@ def register_page( order `0` - `title`: - (string or function) Specifies the page title displayed in the browser tab. - If not supplied, the app's title is used if different from the default "Dash". - Otherwise, the title is the given `name` or inferred from the module name. - For example, `pages.weekly_analytics` is inferred as "Weekly Analytics". + Specifies the page title displayed in the browser tab and used in social media meta tags. + If not supplied, the app's title is used if different from the default "Dash". + Otherwise, the title is inferred from the module name. + For example, `pages.weekly_analytics` is inferred as "Weekly Analytics". - `description`: - (string or function) The . - If not defined, the application description will be used if available. + Specifies the page description used in the `` tag and in social media meta tags. + If not supplied, the app's description is used if available. - `image`: - The meta description image used by social media platforms. - If not supplied, then it looks for the following images in `assets/`: - - A page specific image: `assets/.` is used, e.g. `assets/weekly_analytics.png` - - A generic app image at `assets/app.` - - A logo at `assets/logo.` - When inferring the image file, it will look for the following extensions: + Specifies the image used in social media meta tags. This can be an image filename in the `assets/` folder + or a URL. If not supplied, Dash looks for the following images in `assets/`: + + - A page-specific image: `assets/.`, for example `assets/weekly_analytics.png` + - A generic app image: `assets/app.` + - A logo: `assets/logo.` + When inferring the image file, Dash checks for the following extensions: APNG, AVIF, GIF, JPEG, JPG, PNG, SVG, WebP. - - `image_url`: - Overrides the image property and sets the `` meta tag to the provided image URL. + - `image_url`: + Specifies the URL of the image used in social media meta tags. This property is retained for backwards + compatibility. Use `image` to specify either an image filename or a URL. - `redirect_from`: A list of paths that should redirect to this page. From 0f2e6d7abb866b2d2e61e393311586a8d1cb1822 Mon Sep 17 00:00:00 2001 From: AnnMarueW Date: Fri, 2 Oct 2026 13:28:28 -0700 Subject: [PATCH 2/2] update docstrings --- dash/_pages.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dash/_pages.py b/dash/_pages.py index 8f1ca85114..b63d37c669 100644 --- a/dash/_pages.py +++ b/dash/_pages.py @@ -220,14 +220,14 @@ def register_page( order `0` - `title`: - Specifies the page title displayed in the browser tab and used in social media meta tags. - If not supplied, the app's title is used if different from the default "Dash". - Otherwise, the title is inferred from the module name. - For example, `pages.weekly_analytics` is inferred as "Weekly Analytics". + (string or function) Specifies the page title displayed in the browser tab and used in social media meta tags. + If not supplied, the app's title is used if different from the default "Dash". + Otherwise, the title is the given `name` or inferred from the module name. + For example, `pages.weekly_analytics` is inferred as "Weekly Analytics" - `description`: - Specifies the page description used in the `` tag and in social media meta tags. - If not supplied, the app's description is used if available. + (string or function) Specifies the page description used in the `` tag and in social + media meta tags. If not supplied, the app's description is used if available. - `image`: Specifies the image used in social media meta tags. This can be an image filename in the `assets/` folder