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..b63d37c669 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. + (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". + 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. + (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`: - 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.