Skip to content

Commit

Permalink
feat: added open graph meta tags to enhance SEO (rupali-codes#534)
Browse files Browse the repository at this point in the history
* perf: add opengraph meta tags to enhance SEO

* fix: minor changes in meta tags

* fix: replace working description meta tag

---------

Co-authored-by: Ashutosh <ashutosh_rath@users.noreply.github.com>
  • Loading branch information
ashutosh-rath02 and Ashutosh authored May 12, 2023
1 parent 7719053 commit 2b1e1a1
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
import { Html, Head, Main, NextScript } from "next/document";
import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html lang="en">
<Head>
{/* Should be changed on hosting the website */}
<meta property="og:url" content="https://linkshub.vercel.app/" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="LinksHub: A hub of ready-to-use tech resources"
/>
<meta
property="og:description"
content="LinksHub aims to provide developers with access to a wide range of free resources and tools that they can use in their work."
/>
<meta
property="og:image"
content="https://res.cloudinary.com/dhnkuonev/image/upload/v1683805184/linkshub_gcahgs.png"
/>
<meta property="og:site_name" content="LinksHub" />
{/* <!-- Twitter --> */}
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://linkshub.vercel.app/" />
<meta
property="twitter:title"
content="LinksHub: A hub of ready-to-use tech resources"
/>
<meta
property="twitter:description"
content="LinksHub aims to provide developers with access to a wide range of free resources and tools that they can use in their work."
/>
<meta
property="twitter:image"
content="https://res.cloudinary.com/dhnkuonev/image/upload/v1683805184/linkshub_gcahgs.png"
/>
<script
dangerouslySetInnerHTML={{
__html: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
Expand All @@ -20,7 +51,7 @@ export default function Document() {
src="https://www.googletagmanager.com/ns.html?id=GTM-PC5DFJG"
height="0"
width="0"
style={{ display: "none", visibility: "hidden" }}
style={{ display: 'none', visibility: 'hidden' }}
></iframe>
</noscript>
<div id="overlay-root"></div>
Expand All @@ -29,5 +60,5 @@ export default function Document() {
<NextScript />
</body>
</Html>
);
)
}

0 comments on commit 2b1e1a1

Please sign in to comment.