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

add static seo and social_image, description, etc #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions gridsome.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@
// To restart press CTRL + C in terminal and run `gridsome develop`

module.exports = {
siteOwner: 'Andre Madarang',
siteAuthor: 'Andre Madarang',
siteTwitter: '@drehimself',
authorTwitter: '@drehimself',
siteName: 'Gridsome Portfolio Starter',
siteDescription: 'A simple portfolio theme for Gridsome powered by Tailwind CSS v1',
siteKeywords: 'Gridsome,Vue,Tailwind,Tailwind CSS,JavaScript,HTML,CSS,Vue.js,VueJS',
siteUrl: 'https://gridsome-portfolio-starter.netlify.com',
// take a screen-shot of the homepage and make it available online
// go to https://gridsome-portfolio-starter.netlify.com/landing_image
// right click on the image and select: Copy Image Address and put the contents in siteImage
siteImage: 'https://gridsome-portfolio-starter.netlify.com/assets/static/landing_image.png',
plugins: [
{
use: 'gridsome-plugin-tailwindcss',
Expand Down
47 changes: 31 additions & 16 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import DefaultLayout from '~/layouts/Default.vue'
import VueScrollTo from 'vue-scrollto'
import VueFuse from 'vue-fuse'
import config from '../gridsome.config'

export default function (Vue, { router, head, isClient }) {
// Set default layout as a global component
Expand All @@ -16,25 +17,39 @@ export default function (Vue, { router, head, isClient }) {

Vue.use(VueFuse)

head.meta.push({
name: 'keywords',
content: 'Gridsome,Vue,Tailwind,Tailwind CSS,JavaScript,HTML,CSS,Vue.js,VueJS'
})

head.meta.push({
name: 'description',
content: 'Gridsome Portfolio Starter'
})

head.meta.push({
name: 'author',
content: 'Andre Madarang'
})
// Standart Meta-Tags
head.meta.push(
{ name: 'image', conent: config.siteImage },
{ name: 'title', content: config.siteName },
{ name: 'author', content: config.siteAuthor },
{ name: 'keywords', content: config.keywords },
{ name: 'description', content: config.siteDescription }
)

// Open Graph Data
// https://garywoodfine.com/gridsome-configure-basic-on-page-seo/
head.link.push(
{ name: 'copyright', content: copyRightNotice },
{ property: "og:site_name", content: config.siteName },
{ key: "og:type", property: "og:type", content: 'article' },
{ key: "og:image", property: "og:image", content: config.siteImage },
{ key: "og:description", property: "og:description", content: config.siteDescription }
)

// Twitter Tags
// https://www.danvega.dev/blog/2019/04/09/adding-twitter-cards-to-gridsome/
// twitter-card: https://cards-dev.twitter.com/validator
head.meta.push(
{ name: "twitter:card", content: "summary_large_image" },
{ name: "twitter:title", content: config.siteName },
{ name: "twitter:site", content: config.siteTwitter },
{ name: "twitter:image", content: config.siteImage },
{ name: "twitter:creator", content: config.authorTwitter },
{ name: "twitter:description", content: config.siteDescription }
)

head.link.push({
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Nunito+Sans:400,700'
})
}


13 changes: 13 additions & 0 deletions src/pages/LandingImage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<Layout>
<g-image src="../../static/landing_image.png" width="250px"/>
</Layout>
</template>

<script>
export default {
metaInfo: {
title: 'LandingImage'
}
}
</script>
Binary file added static/landing_image.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.