Skip to content

Extend social meta tags - #4024

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

AnnMarieW wants to merge 2 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

@sonarqubecloud

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

1 participant