Skip to content

Commit

Permalink
Add og-meta
Browse files Browse the repository at this point in the history
  • Loading branch information
anhtuank7c committed Feb 9, 2025
1 parent dfe27e0 commit c28c724
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 2 deletions.
15 changes: 15 additions & 0 deletions _data/data.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
#
# Be aware that even a small syntax error here can lead to failures in output.
#
og-meta:
site_name: cv.anhtuank7c.dev
preview: preview.webp # place a 800x354 picture inside /assets/images/ folder
twitter: anhtuank7c # Twitter username
facebook_publisher: tuanna065 # Facebook username
title: Tuan Nguyen Anh | Full Stack Developer & CTO
author: Tuan Nguyen Anh
language: en-US
published: 2025-02-05T16:31:37+07:00
modified: 2025-02-09T16:31:37+07:00
geo:
placename: QuangNinh, Vietnam
region: VN-QN
position: 21.007273475106725, 106.8589212253367
ICBM: 21.007273475106725, 106.8589212253367

sidebar:
position: left # position of the sidebar : left or right
Expand Down
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ site.description |default: "A beautiful
Jekyll theme for creating resume" }}">
{% include og-meta.html %}

<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico">
Expand Down
40 changes: 40 additions & 0 deletions _includes/og-meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% assign meta = site.data.data.og-meta %}

<!-- META FOR FACEBOOK -->
<meta property="og:site_name" content="{{ meta.site_name }}" />
<meta property="og:rich_attachment" content="true" />
<meta property="og:type" content="article" />
<meta property="article:publisher" content="https://www.facebook.com/{{ meta.facebook_publisher }}/" />
<meta property="og:url" itemprop="url" content="{{ site.url }}" />
<meta property="og:image" itemprop="thumbnailUrl" content="{{ site.url }}/assets/images/{{ meta.preview }}" />
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="354" />
<meta content="{{ meta.title }}" itemprop="headline" property="og:title" />
<meta content="{{ site.description | default: 'A beautiful Jekyll theme for creating resume' }}" itemprop="description"
property="og:description" />
<meta content="news" itemprop="genre" name="medium" />
<meta content="{{ meta.language }}" itemprop="inLanguage" />
<meta content="Tin nhanh VnExpress" itemprop="sourceOrganization" name="source" />
<meta content="{{ meta.published }}" itemprop="datePublished" name="pubdate" />
<meta content="{{ meta.modified }}" itemprop="dateModified" name="lastmod" />
<meta content="{{ meta.published }}" itemprop="dateCreated" />
<meta name="copyright" content="{{ meta.author }}" />
<meta name="author" content="{{ meta.author }}" />
<meta name="robots" content="noarchive, max-image-preview:large, index" />
<meta name="googlebot" content="noarchive" />
<meta name="geo.placename" content="{{ meta.geo.placename }}" />
<meta name="geo.region" content="{{ meta.geo.region }}" />
<meta name="geo.position" content="{{ meta.geo.position }}" />
<meta name="ICBM" content="{{ meta.geo.ICBM }}" />
<meta name="revisit-after" content="days" />

<!-- Twitter Card -->
<meta name="twitter:card" value="summary" />
<meta name="twitter:url" content="{{ site.url }}" />
<meta name="twitter:title" content="{{ meta.title }}" />
<meta name="twitter:description"
content="{{ site.description | default: 'A beautiful Jekyll theme for creating resume' }}" />
<meta name="twitter:image" content="{{ site.url }}/assets/images/{{ meta.preview }}" />
<meta name="twitter:site" content="@{{ meta.twitter }}" />
<meta name="twitter:creator" content="@{{ meta.twitter }}" />
<!-- End Twitter Card -->
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
#Add "layout: compress" here to compress the html code
# layout: compress
---
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
Expand Down
2 changes: 1 addition & 1 deletion _layouts/print.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
#Add "layout: compress" here to compress the html code
layout: compress
---

<!DOCTYPE html>
Expand Down

0 comments on commit c28c724

Please sign in to comment.