Skip to content

Instantly share code, notes, and snippets.

@garethredfern

garethredfern/head.js

Last active Sep 16, 2020
Embed
What would you like to do?
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",
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.