Skip to content

Commit

Permalink
feat: add meta/open graph tags (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcturco authored Nov 4, 2021
1 parent 8a8baab commit 238f560
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
Binary file added site/images/meta/og-image.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion sources/pug/_config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@
// Predefined variables
breadcrumbs = [],
pageName = 'Home'
pageName = 'Home',
// Meta tags
ogData = {
title: 'AsyncAPI Online Conference',
image: '/images/meta/og-image.jpg',
description: 'Join us at the AsyncAPI Online Conference and learn about Open-Source and Event-Driven Architectures.',
twitterCard: 'summary_large_image',
twitterUrl: 'https://twitter.com/asyncapispec'
}
17 changes: 17 additions & 0 deletions sources/pug/_skeleton.pug
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,26 @@ html( lang='en', class= htmlClass )
block title
title= pageName

// Primary Meta Tags
meta( charset='utf-8' )
meta( name='viewport', content='width=device-width, height=device-height, initial-scale=1.0' )
meta( http-equiv='X-UA-Compatible', content='IE=edge' )
meta( name='title', content=ogData.title )
meta( name='description', content=ogData.description )

// Open Graph / Facebook
meta( property='og:type', content='website' )
meta( property='og:url', content=process.env.URL )
meta( property='og:title', content=ogData.title )
meta( property='og:description', content=ogData.description )
meta( property='og:image', content=ogData.image )

// Twitter
meta( property='twitter:card', content=ogData.twitterCard )
meta( property='twitter:url', content=ogData.twitterUrl )
meta( property='twitter:title', content=ogData.title )
meta( property='twitter:description', content=ogData.description )
meta( property='twitter:image', content=ogData.image )

link( rel='icon', href='images/favicon.png', type='image/png' )
link( rel='stylesheet', type='text/css', href= fonts )
Expand Down

0 comments on commit 238f560

Please sign in to comment.