Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
26 changes: 14 additions & 12 deletions dash/_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <meta type="description"></meta>.
If not defined, the application description will be used if available.
(string or function) Specifies the page description used in the `<meta name="description">` 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/<module>.<extension>` is used, e.g. `assets/weekly_analytics.png`
- A generic app image at `assets/app.<extension>`
- A logo at `assets/logo.<extension>`
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/<module>.<extension>`, for example `assets/weekly_analytics.png`
- A generic app image: `assets/app.<extension>`
- A logo: `assets/logo.<extension>`
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 `<image>` 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.
Expand Down
Loading