Skip to content

Instantly share code, notes, and snippets.

@garethredfern
Last active July 25, 2023 22:21
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save garethredfern/bc3108a44d5e6bdd6de2121e774612bc to your computer and use it in GitHub Desktop.
Save garethredfern/bc3108a44d5e6bdd6de2121e774612bc to your computer and use it in GitHub Desktop.
The full head tag for a Nuxt website, including social media and SEO tags. Put this in your nuxt.config.js file.
head: {
htmlAttrs: {
lang: "en-GB",
},
title: "Articles focused on learning Laravel and VueJS",
meta: [
{ charset: "utf-8" },
{ name: "HandheldFriendly", content: "True" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{
hid: "description",
name: "description",
content: "Articles focused on the beautiful art of landscape painting.",
},
{ property: "og:site_name", content: "Redfern Dev" },
{ hid: "og:type", property: "og:type", content: "website" },
{
hid: "og:url",
property: "og:url",
content: "https://bobross.com",
},
{
hid: "og:title",
property: "og:title",
content: "My Amazing Blog on The Joy of Painting",
},
{
hid: "og:description",
property: "og:description",
content: "Articles focused on the beautiful art of landscape painting.",
},
{
hid: "og:image",
property: "og:image",
content: "/a-lovely-image.png",
},
{ property: "og:image:width", content: "740" },
{ property: "og:image:height", content: "300" },
{ name: "twitter:site", content: "@bobross" },
{ name: "twitter:card", content: "summary_large_image" },
{
hid: "twitter:url",
name: "twitter:url",
content: "https://bobross.com",
},
{
hid: "twitter:title",
name: "twitter:title",
content: "My Amazing Blog on The Joy of Painting",
},
{
hid: "twitter:description",
name: "twitter:description",
content: "Articles focused on the beautiful art of landscape painting.",
},
{
hid: "twitter:image",
name: "twitter:image",
content: "/a-loveley-image.png",
},
],
link: [
{ rel: "icon", type: "image/svg+xml", href: "/favicon.svg" },
{
hid: "canonical",
rel: "canonical",
href: "https://bobross.com",
},
]
}
@BayBreezy
Copy link

Would it be okay with you if i tried turning this into a Nuxt 3 module?
Thanks btw

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