Skip to content

Commit

Permalink
feat: adds meta data for twitter sharing and for home page
Browse files Browse the repository at this point in the history
  • Loading branch information
migtarx committed Dec 3, 2023
1 parent 3ef2e93 commit ee9df88
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 2 additions & 0 deletions content/_index.es.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
+++
framed = true
ogimage = "https://cdn.mpuerta.com/MPkmuk0.png"
ogdescription = "¡Bienvenido a mi blog! Aquí compartiré mis experiencias como desarrollador de software profesional y algunas como administrador de sistemas en mi tiempo libre."
ogtitle = "El blog de migtarx"
+++
# Hola! Soy migtarx!

Expand Down
2 changes: 2 additions & 0 deletions content/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
+++
framed = true
ogimage = "https://cdn.mpuerta.com/MPgsune.png"
ogdescription = "Welcome to my blog! Here, I will share my experiences as a professional software developer and a few as a system administrator in my spare time!"
ogtitle = "migtarx's blog"
+++
# Hey! I'm migtarx!

Expand Down
13 changes: 8 additions & 5 deletions themes/hello-friend/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@
<link href="{{ (resources.Get "fonts/Inter-BoldItalic.woff2").RelPermalink }}" rel="preload" type="font/woff2" as="font" crossorigin="">

<!-- Twitter Card -->
{{ template "_internal/twitter_cards.html" . }}
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="{{ with .Params.title }}{{ . }}{{ else }}{{ .Params.ogtitle }}{{ end }}">
<meta name="twitter:description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Params.ogdescription }}{{ end }}">
<meta name="twitter:image" content="{{ .Params.ogimage }}">

<!-- OG data -->
{{ template "_internal/opengraph.html" . }}
<!-- OG data -->
<!-- Open Graph -->
<meta property="og:title" content="{{ with .Params.title }}{{ . }}{{ else }}{{ .Params.ogtitle }}{{ end }}">
<meta property="og:description" content="{{ with .Params.description }}{{ . }}{{ else }}{{ .Params.ogdescription }}{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:image" content="{{ .Params.ogimage }}" />
<meta name="twitter:image" content="{{ .Params.ogimage }}">
<meta property="og:site_name" content="migtarx.com">

<!-- RSS | JSON -->
Expand Down

0 comments on commit ee9df88

Please sign in to comment.