Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package hub doesn't have OpenGraph tags #1883

Open
joellabes opened this issue Sep 20, 2022 · 4 comments
Open

Package hub doesn't have OpenGraph tags #1883

joellabes opened this issue Sep 20, 2022 · 4 comments

Comments

@joellabes
Copy link
Contributor

I just tried to mention https://hub.getdbt.com/dbt-labs/audit_helper/latest/ on Discourse, and the unfurl didn't work properly because "the following oEmbed / OpenGraph tags could not be found: description, image"

image

Paging @krevitt who is my go-to for all these things 😬

Also, the page's title is just dbt - Package hub, when really it should be the name of the package. I can that pretty easily, but don't know anything about OpenGraph.

@dbeatty10
Copy link
Contributor

dbeatty10 commented Oct 27, 2022

I didn't know anything about OpenGraph so Googled a bit to bootstrap my knowledge.

Implementation

Here's my best guess for how to approach this:

  1. Fill out the Title, Description, and Image URL here to discover the applicable OpenGraph tags
  2. Observe the Preview on the right-hand side of the screen and iterate until satisfied
  3. Copy the content from the middle and paste it here
  4. Generalize the OpenGraph tags from the previous step to incorporate applicable template variables

The steps above should add both the "description" and "image" tags that are currently missing to the webpage for each package.

Verification

  1. Create a PR in this repo
  2. Wait for the preview website to deploy
  3. Paste URLs from the preview into this webpage
  4. Confirm the preview on the right hand side looks as desired

Check each of the following:

  1. The root of the website
  2. Individual pages for at least two different packages (to confirm that no variables are accidentally hard-coded)

Example

See here for an example PR that solved this issue.

@joellabes
Copy link
Contributor Author

To have a description really means that this is blocked by the issue (that I can't find right now) that suggests we include a repo's About section on the hub page; once we have that, we can also use it here.
image

@dbeatty10
Copy link
Contributor

Love the suggestion to automatically acquire the About section from GitHub and then use it in the OpenGraph tags.

I wouldn't consider this fully blocking though, since we could choose something for the description that is immediately available (like some trivial re-statement of the title or some generic description assuming that an empty string doesn't work).

@joellabes
Copy link
Contributor Author

I wouldn't consider this fully blocking though, since we could choose something for the description that is immediately available

Fair! I just didn't want dbt models for dbt-utils to proliferate any further 😅

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

No branches or pull requests

2 participants