Skip to content

Extend social meta tags - #4024

Open
AnnMarieW wants to merge 5 commits into
plotly:devfrom
AnnMarieW:extend-social-meta-tags
Open

AnnMarieW wants to merge 5 commits into
plotly:devfrom
AnnMarieW:extend-social-meta-tags

Conversation

@AnnMarieW

Copy link
Copy Markdown
Collaborator

closes #2699

Currently, social media meta tags are automatically added for apps using Dash Pages.

This PR extends the existing include_pages_meta to regular Dash apps. The meta tags will be added if there is an app.descrption or app.image.

The app.image can be an asset filename or a URL.

For Pages apps, the app-level values provide defaults that can be overridden by page-level metadata.

Question:

  • Should there be a default image? If so, what's the best way to add one - using a URL?
  • If a default image is added, then the metatags would be generated for all apps. Should it be opt-in?

To do:

  • add tests
  • add changelog
  • write docs and forum post

sample app

from dash import Dash, html

app = Dash(title="my title", description="my description", image="my_app.png")

app.layout = html.Div(["Hey!  Meta tags!"])

if __name__ == "__main__":
    app.run(debug=True)
image

@camdecoster

Copy link
Copy Markdown
Contributor

Thanks Ann Marie! Philippe will take a look soon.

@T4rk1n T4rk1n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a default image? If so, what's the best way to add one - using a URL?

I don't think we should add a default image, the image should be specific to the app to make it stand out.

We also have thumbnails and card on plotly cloud that are auto generated from the content, I think those are better than a generic default.

Code looks good, just need to add some tests.

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enable adding default meta tags

3 participants