Skip to content

Commit

Permalink
opengraph
Browse files Browse the repository at this point in the history
  • Loading branch information
iCaran committed Aug 4, 2024
1 parent d57b801 commit 43e5ef6
Show file tree
Hide file tree
Showing 25 changed files with 2,036 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ showComments = true
# Whether to group articles by year.
groupByYear = false
# Whether to show dates with article listings.
showDate = false
showDate = true

# Taxonomy settings
[taxonomy]
Expand Down
2 changes: 1 addition & 1 deletion content/posts/cgpa.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "A Short Note on CGPA | AKA | How To Approach College in India"
date: "2024-08-03"
description: "A Balance between Skills and Scores"
tags: [
"college",
"college", "India"
]
draft: "false"
---
Expand Down
10 changes: 10 additions & 0 deletions content/posts/hwh-to-bbs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
author: "Divyanshu Kumar | Karan Pratap Shaw"
title: "One Train Experience | The Job Human Trafficking Racket in India"
date: "2024-08-03"
description: "The Informal Jobs Trafficking which happens Everyday, Unaccounted for in the Country."
tags: [
"Modern Slavery", "India", "Indian Rail"
]
draft: "false"
---
30 changes: 30 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ define "main" }}

<h1 class="pg-title">{{ .Title | emojify }}</h1>

{{/* Meta */}}
<div class="meta">
{{ partial "single/meta.html" . }}
{{ partial "single/meta-tags.html" . }}
</div>

{{ partial "single/toc.html" . }}
{{ partial "opengraph.html" . }}

{{ .Content }}

{{/* Pagination */}}
{{ partial "single/pagination.html" . }}

{{/* Comments */}}
{{ if .Params.showComments | default (.Site.Params.article.showComments | default false) }}
{{ if templates.Exists "partials/comments.html" }}
<div class="comment">
{{ partial "comments.html" . }}
</div>
{{ else }}
{{ warnf "Comments are enabled for %s but no comments partial exists." .File.Path }}
{{ end }}
{{ end }}

{{ end }}
74 changes: 74 additions & 0 deletions layouts/partials/opengraph.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<meta property="og:url" content="{{ .Permalink }}">

{{- with or site.Title site.Params.title | plainify }}
<meta property="og:site_name" content="{{ . }}">
{{- end }}

{{- with or .Title site.Title site.Params.title | plainify }}
<meta property="og:title" content="{{ . }}">
{{- end }}

{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }}
<meta property="og:description" content="{{ . }}">
{{- end }}

{{- with or .Params.locale site.Language.LanguageCode }}
<meta property="og:locale" content="{{ replace . `-` `_` }}">
{{- end }}

{{- if .IsPage }}
<meta property="og:type" content="article">
{{- with .Section }}
<meta property="article:section" content="{{ . }}">
{{- end }}
{{- $ISO8601 := "2006-01-02T15:04:05-07:00" }}
{{- with .PublishDate }}
<meta property="article:published_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
{{- end }}
{{- with .Lastmod }}
<meta property="article:modified_time" {{ .Format $ISO8601 | printf "content=%q" | safeHTMLAttr }}>
{{- end }}
{{- range .GetTerms "tags" | first 6 }}
<meta property="article:tag" content="{{ .Page.Title | plainify }}">
{{- end }}
{{- else }}
<meta property="og:type" content="website">
{{- end }}

{{- with partial "_funcs/get-page-images" . }}
{{- range . | first 6 }}
<meta property="og:image" content="{{ .Permalink }}">
{{- end }}
{{- end }}

{{- with .Params.audio }}
{{- range . | first 6 }}
<meta property="og:audio" content="{{ . | absURL }}">
{{- end }}
{{- end }}

{{- with .Params.videos }}
{{- range . | first 6 }}
<meta property="og:video" content="{{ . | absURL }}">
{{- end }}
{{- end }}

{{- range .GetTerms "series" }}
{{- range .Pages | first 7 }}
{{- if ne $ . }}
<meta property="og:see_also" content="{{ .Permalink }}">
{{- end }}
{{- end }}
{{- end }}

{{- with site.Params.social }}
{{- if reflect.IsMap . }}
{{- with .facebook_app_id }}
<meta property="fb:app_id" content="{{ . }}">
{{- else }}
{{- with .facebook_admin }}
<meta property="fb:admins" content="{{ . }}">
{{- end }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions public/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,15 @@ <h1 class="pg-title">About विचारमञ्जरी</h1>



<meta property="og:url" content="http://localhost:1313/about/">
<meta property="og:site_name" content="विचारमञ्जरी (Vichāramañjarī)">
<meta property="og:title" content="About विचारमञ्जरी">
<meta property="og:description" content="Meet the Authors">
<meta property="og:locale" content="en_in">
<meta property="og:type" content="article">
<meta property="article:published_time" content="2024-08-02T00:00:00+00:00">
<meta property="article:modified_time" content="2024-08-02T00:00:00+00:00">
<meta property="article:tag" content="About Us">

<p>Welcome to <strong>विचारमञ्जरी (Vichāramañjarī)</strong>, a personal blog crafted by Karan Pratap Shaw and Divyanshu Kumar. This space is dedicated to exploring a myriad of topics, from the latest in technology to personal experiences and insights. Our aim is to provide valuable content that resonates with a diverse audience.</p>
<p>Our blog is powered by Hugo, a static site generator known for its efficiency and speed. We believe in the power of open-source, and our site is a testament to this philosophy, being built with a responsive design, easy content management, and customizable themes.</p>
Expand Down
52 changes: 52 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,58 @@ <h2 class="ft-title"><a href="/posts/cgpa/">A Short Note on CGPA | AKA | How To

</section>

<section class="list-item">
<h2 class="ft-title"><a href="/posts/hwh-to-bbs/">One Train Experience | The Job Human Trafficking Racket in India</a></h2>
<div class="meta">




<p>




<span class="meta-icon">

<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="currentColor" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19,4H17V3a1,1,0,0,0-2,0V4H9V3A1,1,0,0,0,7,3V4H5A3,3,0,0,0,2,7V19a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V7A3,3,0,0,0,19,4Zm1,15a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V12H20Zm0-9H4V7A1,1,0,0,1,5,6H7V7A1,1,0,0,0,9,7V6h6V7a1,1,0,0,0,2,0V6h2a1,1,0,0,1,1,1Z"/></svg>


</span>
Posted on <time datetime="2024-08-03T00:00:00&#43;00:00">Aug 3, 2024</time>





<span class="meta-icon">

<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM3.00683 12C3.00683 16.9668 7.03321 20.9932 12 20.9932C16.9668 20.9932 20.9932 16.9668 20.9932 12C20.9932 7.03321 16.9668 3.00683 12 3.00683C7.03321 3.00683 3.00683 7.03321 3.00683 12Z" fill="currentColor"/>
<path d="M12 5C11.4477 5 11 5.44771 11 6V12.4667C11 12.4667 11 12.7274 11.1267 12.9235C11.2115 13.0898 11.3437 13.2343 11.5174 13.3346L16.1372 16.0019C16.6155 16.278 17.2271 16.1141 17.5032 15.6358C17.7793 15.1575 17.6155 14.5459 17.1372 14.2698L13 11.8812V6C13 5.44772 12.5523 5 12 5Z" fill="currentColor"/>
</svg>


</span>

0 min



</p>

</div>
<div class="description">

</div>


<div class="readmore"> <a href="/posts/hwh-to-bbs/">Read more &rarr;</a> </div>

</section>


<div class="showmore">
<button onclick="window.location.href = '\/posts'" aria-label="Show More"> Show More </a>
Expand Down
7 changes: 7 additions & 0 deletions public/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<guid>http://localhost:1313/posts/cgpa/</guid>
<description>Much is said about the importance of CGPA or its lack thereof to new students trying to navigate college life and to hopefully get a good job.&#xA;The popular belief nowadays is that CGPA does not matter and it&amp;rsquo;s only one&amp;rsquo;s skills, specifically coding skills, that matter during the recruitment process.&#xA;However, this is only half true. What was originally meant by this sentiment was that CGPA alone cannot get you a job.</description>
</item>
<item>
<title>One Train Experience | The Job Human Trafficking Racket in India</title>
<link>http://localhost:1313/posts/hwh-to-bbs/</link>
<pubDate>Sat, 03 Aug 2024 00:00:00 +0000</pubDate>
<guid>http://localhost:1313/posts/hwh-to-bbs/</guid>
<description></description>
</item>
<item>
<title>About विचारमञ्जरी</title>
<link>http://localhost:1313/about/</link>
Expand Down
Loading

0 comments on commit 43e5ef6

Please sign in to comment.