Use hugo-social-metadata subcomponent for social metadata

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-02-03 01:50:45 +05:30
parent bf0b9bce22
commit 7f2de9c889
14 changed files with 17 additions and 45 deletions

View File

@ -1,13 +1,15 @@
baseurl = "https://msfjarvis.dev/"
languageCode = "en-us"
title = "Harsh Shandilya"
theme = ["hugo-cloak-email", "hyde"]
theme = ["hugo-cloak-email", "hugo-social-metadata", "hyde"]
pygmentsUseClasses = true
author = "Harsh Shandilya"
[params]
description = "Android Developer, Kotlin fanatic and wannabe Rustacean"
keywords = "homepage, blog, android, kotlin, programming"
twitterUsername = "@msf_jarvis"
socialImage = "https://msfjarvis.dev/android-chrome-512x512.webp"
contentTypeName = "posts"
CommentoURL = "https://commento.msfjarvis.dev"

View File

@ -6,7 +6,7 @@ tags = ["android", "dagger", "tutorial"]
title = "Dagger the easy way - Part 1"
description = "Dagger is universally intimidating to beginners and I want to change it."
devLink = "https://dev.to/msfjarvis/dagger-the-easy-way-part-1-3l7b"
socialImage = "dagger_made_easy_social"
socialImage = "uploads/dagger_made_easy_social.png"
+++
> Updated on 22 Jan 2020 with some additional comments from [@arunkumar_9t2](https://twitter.com/arunkumar_9t2). Look out for them as block quotes similar to this one.

View File

@ -6,7 +6,7 @@ slug = "dagger-the-easy-way--part-2"
tags = ["android", "dagger", "tutorial"]
title = "Dagger the easy way - Part 2"
description = "Let's extend the \"scope\" of these tutorials :)"
socialImage = "dagger_made_easy_social"
socialImage = "uploads/dagger_made_easy_social.png"
+++
Welcome back! In this post I'm taking a bit of detour from my planned schedule to write about **scoping**. We'll _definitely_ cover constructor injection in the next part :)

View File

@ -5,7 +5,7 @@ slug = "deploying-hugo-sites-with-github-actions"
tags = ["hugo", "github actions", "static sites"]
title = "Deploying Hugo sites with GitHub Actions"
description = "GitHub Actions are awesome! Learn how to use it for continuous delivery of your static sites."
socialImage = "actions_social"
socialImage = "uploads/actions_social.png"
+++
For the longest time, I have used the [caddy-git] middleware for [caddyserver](https://caddyserver.com) to constantly deploy my [Hugo](https://gohugo.io) site from [GitHub](https://github.com/msfjarvis/msfjarvis.dev).

View File

@ -6,7 +6,7 @@ tags = ["hugo", "static sites", "comments"]
title = "Integrating comments in Hugo sites with commento"
description = "Adding additional comment backends to Hugo is actually rather simple!"
devLink = "https://dev.to/msfjarvis/integrating-comments-in-hugo-sites-with-commento-136f"
socialImage = "commento_social"
socialImage = "uploads/commento_social.png"
+++
Disqus is unequivocally the leader when it comes to hosted comments, and it works rather swimmingly with sites of all kinds with minimal hassle. But this ease has a gnarly flipside: [annoying referral links](https://stiobhart.net/2017-02-21-disqusting/) and a [huge bundle size](https://victorzhou.com/blog/replacing-disqus/) that significantly affects page load speeds.

View File

@ -6,7 +6,7 @@ slug = "my-dagger-story"
tags = ["android", "dagger"]
title = "My Dagger Story"
devLink = "https://dev.to/msfjarvis/my-dagger-story-2go0"
socialImage = "dagger_story_social"
socialImage = "uploads/dagger_story_social.png"
+++
[Dagger](https://dagger.dev) is infamous for very good reasons. It's complicated to use, the documentation is an absolute shitshow, and simpler 'alternatives' exist. While [Koin](http://insert-koin.io/) and to a lesser extent [Kodein](https://kodein.org/di/) do the job, they're still service locators at their core and don't automatically inject dependencies like Dagger does.

View File

@ -6,7 +6,7 @@ tags = ["android", "gradle", "github", "packaging"]
title = "Publishing an Android library to GitHub Packages"
description = "GitHub recently rolled out Packages to the general public, allowing the entire develop-test-deploy pipeline to get centralized at GitHub. Learn how to use it to publish your Android library packages."
devLink = "https://dev.to/msfjarvis/publishing-an-android-library-to-github-packages-1l74"
socialImage = "github_packages_social"
socialImage = "uploads/github_packages_social.png"
+++
GitHub released the Package Registry beta in May of this year, and graduated it to public availability in Universe 2019, rebranded as [GitHub Packages](https://github.com/features/packages "GitHub Packages"). It supports NodeJS, Docker, Maven, Gradle, NuGet, and RubyGems. That's a LOT of ground covered for a service that's about one year old.

View File

@ -6,7 +6,7 @@ tags = ["caddyserver", "goaccess", "analytics"]
title = "Server-side analytics with Goaccess"
description = "Analytics platforms are often overwhelming and a privacy nightmare -- here's how to bring analytics to the backend with very simple tooling"
devLink = "https://dev.to/msfjarvis/server-side-analytics-with-goaccess-pg8"
socialImage = "goaccess_social"
socialImage = "uploads/goaccess_social.png"
+++
Analytics are a very helpful aspect of any development. They allow developers to know what parts of their apps are visited the most often and can use more attention, and for bloggers to know what content does or does not resonate with their readers.

View File

@ -6,7 +6,7 @@ tags = ["teachingkotlin", "android", "kotlin"]
title = "#TeachingKotlin - Kotlin for Android Java developers"
description = "Kotlin's been great for me -- and millions others, as evident by its explosive growth. Long-time Java developers may feel hesitant to give it a shot. This series aims to smoothen this transition, letting people know what benefits they might reap from Kotlin, and what differences should they be careful about."
devLink = "https://dev.to/msfjarvis/teachingkotlin-kotlin-for-android-java-developers-1fo3"
socialImage = "teachingkotlin_social"
socialImage = "uploads/teachingkotlin_social.png"
+++
Anybody familiar with my work knows that I am a fan of the [Kotlin](https://kotlinlang.org/ "Kotlin") programming language, especially it's interoperability with Java with respect to Android. I'll admit, I've not been a fan since day one. The abundant lambdas worried me and everything being that much shorter to implement was confusing to a person whose first real programming task was in the Java programming language.

View File

@ -6,7 +6,7 @@ slug = "teaching-kotlin--classes-and-objects"
tags = ["android", "teachingkotlin", "kotlin"]
title = "#TeachingKotlin Part 1 - Classes and Objects and everything in between"
devLink = "https://dev.to/msfjarvis/teachingkotlin-part-1-classes-and-objects-and-everything-in-between-5bn0"
socialImage = "teachingkotlin_social"
socialImage = "uploads/teachingkotlin_social.png"
+++
Classes in Kotlin closely mimic their Java counterparts in implementation, with some crucial changes that I will attempt to outline here.

View File

@ -6,7 +6,7 @@ tags = ["android", "teachingkotlin", "kotlin"]
title = "#TeachingKotlin Part 2 - Variables"
description = "The second post in #TeachingKotlin series, this post goes over Kotlin's variables and their attributes, like visibility and getters/setters."
devLink = "https://dev.to/msfjarvis/teachingkotlin-part-2-variables-2api"
socialImage = "teachingkotlin_social"
socialImage = "uploads/teachingkotlin_social.png"
+++
Even the variables in Kotlin are supercharged!

View File

@ -6,7 +6,7 @@ slug = "teachingkotlin-part-3--caveats-coming-from-java"
tags = ["android", "teachingkotlin", "kotlin"]
title = "#TeachingKotlin Part 3 - Caveats coming from Java"
devLink = "https://dev.to/msfjarvis/teachingkotlin-part-3-caveats-coming-from-java-2e1k"
socialImage = "teachingkotlin_social"
socialImage = "uploads/teachingkotlin_social.png"
+++
When you start migrating your Java code to Kotlin, you will encounter multiple subtle changes that might catch you off guard. I'll document some of these gotchas that I and other people I follow have found and written about.

View File

@ -6,7 +6,7 @@ tags = ["dev", "rust"]
categories = ["dev", "rust"]
description = "Rust is an amazing systems language that is on an explosive rise thanks to its memory safety guarantees and fast, iterative development. In this post, I recap some of the tooling that I use with Rust to make coding in it even more fun and intuitive"
devLink = "https://dev.to/msfjarvis/tools-for-effective-rust-development-3mb4"
socialImage = "rust_social"
socialImage = "uploads/rust_social.png"
+++
[Rust] is a memory-safe systems language that is blazing fast, and comes with no runtime or garbage collector overhead. It can be used to build very performant web services, CLI tools, and even [Linux kernel modules](https://github.com/fishinabarrel/linux-kernel-module-rust)!

View File

@ -8,38 +8,8 @@
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Configure meta and title tags -->
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@msf_jarvis">
{{ if .IsHome -}}
<title>{{ .Site.Title }}</title>
<meta name="description" content="{{ $.Site.Params.description }}" />
<meta name="keywords" content="{{ $.Site.Params.Keywords }}">
<meta property="og:image" content="{{ .Site.BaseURL }}android-chrome-512x512.webp">
<meta property="og:url" content="{{ .Site.BaseURL }}">
<meta property="og:title" content="{{ .Site.Title }}">
<meta name="og:description" content="{{ $.Site.Params.description }}" />
<meta name="twitter:title" content="{{ .Site.Title }}">
<meta name="twitter:description" content="{{ $.Site.Params.description }}">
<meta name="twitter:url" content="{{ .Site.BaseURL }}">
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}android-chrome-512x512.webp">
{{ else }}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
<meta name="description" content="{{ .Description }}">
<meta name="keywords" content="{{ range .Params.tags }}{{ . }},{{ end }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ .Title }} &middot; {{ .Site.Title }}">
<meta name="og:description" content="{{ .Description }}">
<meta name="twitter:title" content="{{ .Title }} &middot; {{ .Site.Title }}">
<meta name="twitter:description" content="{{ .Description }}">
<meta name="twitter:url" content="{{ .Permalink }}">
{{ if .Params.SocialImage }}
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}uploads/{{ .Params.SocialImage }}.png">
{{ else }}
<meta name="twitter:image:src" content="{{ .Site.BaseURL }}android-chrome-512x512.webp">
{{ end }}
{{- end }}
<!-- Social metadata -->
{{ partial "social_metadata.html" . }}
<!-- CSS -->
{{ $poole := resources.Get "css/poole.css" | resources.ExecuteAsTemplate "poole.css" . }}