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

chore: add meta/open graph tags #71

Merged
merged 3 commits into from
Nov 4, 2021
Merged

chore: add meta/open graph tags #71

merged 3 commits into from
Nov 4, 2021

Conversation

mcturco
Copy link
Member

@mcturco mcturco commented Nov 4, 2021

Description

  • Added general meta tags for title, description, type, url
  • Added Open Graph tags for Facebook
  • Added Twitter tags

Related issue(s)
Resolves #57

@mcturco mcturco requested review from fmvilas and derberg November 4, 2021 19:15
@netlify
Copy link

netlify bot commented Nov 4, 2021

✔️ Deploy Preview for peaceful-ramanujan-288045 ready!

🔨 Explore the source changes: 571884e

🔍 Inspect the deploy log: https://app.netlify.com/sites/peaceful-ramanujan-288045/deploys/61843d23b39d1e0007621d6c

😎 Browse the preview: https://deploy-preview-71--peaceful-ramanujan-288045.netlify.app/

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@derberg
Copy link
Member

derberg commented Nov 4, 2021

@mcturco that was fast! how was it with PUG 😄

All is good except of the image. Look at Slack and Twitter:

Screenshot 2021-11-04 at 20 41 24

Screenshot 2021-11-04 at 20 41 48

docs say:

og:image The full URL for the image associated with the page—for example, https://yoursite.com/image.jpg rather than a relative URL like /image.jpg

try this in PUG config. URL is env variable that is populated by Netlify during the build, so it will work on production and previews too, no need to hardcode

image: `${process.env.URL}/images/meta/og-image.jpg`

@mcturco
Copy link
Member Author

mcturco commented Nov 4, 2021

@derberg okay yup! I just noticed the same thing and fixed it! It was just the image path that wasn't nearly correct once it passes through netlify :) you can see the preview here: https://www.opengraph.xyz/url/https%3A%2F%2Fdeploy-preview-71--peaceful-ramanujan-288045.netlify.app%2F/

@mcturco
Copy link
Member Author

mcturco commented Nov 4, 2021

how was it with PUG 😄

It was honestly not terrible! But probably would take some getting used to. I'm used to writing HTML the normal way, although with emmet abbreviations its not too bad 😄

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

oh, so the docs lie and you can actually have a relative path, interesting

anyway, just made one suggestion so we do not hardcode the URL of the conference website (as it will later turn into conference.2021.asyncapi.com and we forget to change)

sources/pug/_skeleton.pug Outdated Show resolved Hide resolved
Co-authored-by: Lukasz Gornicki <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mcturco
Copy link
Member Author

mcturco commented Nov 4, 2021

oh, so the docs lie and you can actually have a relative path, interesting

I think it is due to Netlify deploying it. It must fill in the blanks for us 😄

just made one suggestion so we do not hardcode the URL

Good idea, thank you! Committed that in.

Copy link
Member

@derberg derberg left a comment

Choose a reason for hiding this comment

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

Perfect work 🚀
Thank you so much 🍺

@derberg derberg merged commit 238f560 into asyncapi:master Nov 4, 2021
@mcturco mcturco deleted the missy-og-tags branch November 4, 2021 20:45
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.

Support opengraph tags
2 participants