Skip to content

Commit 0567529

Browse files
committed
Add changelog for #4024 and update register_page docstrings
1 parent babecd5 commit 0567529

2 files changed

Lines changed: 17 additions & 14 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
55
## [Unreleased]
66

77
### Added
8+
- [#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`.
89
- [#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).
910
- [#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.
1011
- [#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`.

‎dash/_pages.py‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -220,26 +220,28 @@ def register_page(
220220
order `0`
221221
222222
- `title`:
223-
(string or function) Specifies the page title displayed in the browser tab.
224-
If not supplied, the app's title is used if different from the default "Dash".
225-
Otherwise, the title is the given `name` or inferred from the module name.
226-
For example, `pages.weekly_analytics` is inferred as "Weekly Analytics".
223+
Specifies the page title displayed in the browser tab and used in social media meta tags.
224+
If not supplied, the app's title is used if different from the default "Dash".
225+
Otherwise, the title is inferred from the module name.
226+
For example, `pages.weekly_analytics` is inferred as "Weekly Analytics".
227227
228228
- `description`:
229-
(string or function) The <meta type="description"></meta>.
230-
If not defined, the application description will be used if available.
229+
Specifies the page description used in the `<meta name="description">` tag and in social media meta tags.
230+
If not supplied, the app's description is used if available.
231231
232232
- `image`:
233-
The meta description image used by social media platforms.
234-
If not supplied, then it looks for the following images in `assets/`:
235-
- A page specific image: `assets/<module>.<extension>` is used, e.g. `assets/weekly_analytics.png`
236-
- A generic app image at `assets/app.<extension>`
237-
- A logo at `assets/logo.<extension>`
238-
When inferring the image file, it will look for the following extensions:
233+
Specifies the image used in social media meta tags. This can be an image filename in the `assets/` folder
234+
or a URL. If not supplied, Dash looks for the following images in `assets/`:
235+
236+
- A page-specific image: `assets/<module>.<extension>`, for example `assets/weekly_analytics.png`
237+
- A generic app image: `assets/app.<extension>`
238+
- A logo: `assets/logo.<extension>`
239+
When inferring the image file, Dash checks for the following extensions:
239240
APNG, AVIF, GIF, JPEG, JPG, PNG, SVG, WebP.
240241
241-
- `image_url`:
242-
Overrides the image property and sets the `<image>` meta tag to the provided image URL.
242+
- `image_url`:
243+
Specifies the URL of the image used in social media meta tags. This property is retained for backwards
244+
compatibility. Use `image` to specify either an image filename or a URL.
243245
244246
- `redirect_from`:
245247
A list of paths that should redirect to this page.

0 commit comments

Comments
 (0)