all repos — archie @ 03a155de82857e856b85a60545ea998b64cfc24e

A minimal Hugo Theme

Better Seo and Images
athul athul8720@gmail.com
Wed, 24 Jun 2020 13:27:58 +0530
commit

03a155de82857e856b85a60545ea998b64cfc24e

parent

17a1d3b6408fbb8eaaaf873f346c63fa26b4a92e

4 files changed, 122 insertions(+), 4 deletions(-)

jump to
M layouts/partials/footer.htmllayouts/partials/footer.html

@@ -13,5 +13,4 @@ {{- if (isset .Site.Params "social") -}}

<script> feather.replace() </script> -{{- end }} - +{{- end -}}
M layouts/partials/header.htmllayouts/partials/header.html

@@ -4,7 +4,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge">

{{- $title := ( .Title ) -}} {{- $siteTitle := ( .Site.Title ) -}} {{- if .IsHome -}} - <title>{{ $siteTitle }} {{ if isset .Site.Params "subtitle" }}- {{ .Site.Params.Subtitle }}{{ end }} </title> + <title>{{ $siteTitle }} | Home </title> {{- else -}} <title>{{ $title }} - {{ $siteTitle }}</title> {{- end -}}

@@ -14,10 +14,16 @@ <link rel="icon" type="image/png" href={{ .Site.Params.favicon }} />

{{- end -}} <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta property="og:title" content="{{ $title }} | {{ $siteTitle }}" /> + <meta name="twitter:title" content="{{ $title }} | {{ $siteTitle }}" /> + <meta property="og:image" content="{{ .Site.Params.og_image }}"/> + <meta itemprop="name" content="{{ $title }} | {{ $siteTitle }}" /> + <meta name="application-name" content="{{ $title }} | {{ $siteTitle }}" /> + <meta property="og:site_name" content="{{ .Site.Params.sitename }}" /> {{ with .OutputFormats.Get "rss" -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - + <meta name="description" content="{{ $.Param "description" }}"> {{- template "_internal/opengraph.html" . -}} {{- template "_internal/twitter_cards.html" . -}} {{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}}
M static/css/dark.cssstatic/css/dark.css

@@ -111,3 +111,49 @@ .draft-label {

color: var(--darkMaincolor); background-color: blue; } +.highlight pre code[class=language-javaScript]::before, +.highlight pre code[class="language-js"]::before { + content: "js"; + background: #f7df1e; + color: black; +} +.highlight pre code[class*='language-yml']::before, +.highlight pre code[class*='language-yaml']::before { + content: 'yaml'; + background: #f71e6a; + color: white; +} +.highlight pre code[class*='language-shell']::before, +.highlight pre code[class*='language-bash']::before, +.highlight pre code[class*='language-sh']::before { + content: 'shell'; + background: green; + color:white +} +.highlight pre code[class*='language-json']::before{ + content: 'json'; + background: dodgerblue; + color: #000000 +} +.highlight pre code[class*='language-python']::before, +.highlight pre code[class*='language-py']::before { + content: 'py'; + background: blue; + color: yellow ; +} +.highlight pre code[class*='language-css']::before{ + content: 'css'; + background: cyan; + color: black ; +} +.highlight pre code[class*='language-go']::before{ + content: 'Go'; + background: cyan; + color: royalblue ; +} +.highlight pre code[class*='language-md']::before, +.highlight pre code[class*='language-md']::before{ + content: 'Markdown'; + background: royalblue; + color: whitesmoke ; +}
M static/css/main.cssstatic/css/main.css

@@ -225,4 +225,71 @@ padding: 2px 4px;

border-radius: 4px; margin-left: 6px; background-color: #f9f2f4; +} +.highlight { + position: relative; + -webkit-overflow-scrolling: touch; +} +.highlight pre code[class*="language-"] { + -webkit-overflow-scrolling: touch; +} +.highlight pre code[class*="language-"]::before { + background: black; + border-radius: 0 0 0.25rem 0.25rem; + color: white; + font-size: 12px; + letter-spacing: 0.025rem; + padding: 0.1rem 0.5rem; + position: absolute; + right: 1rem; + text-align: right; + text-transform: uppercase; + top: 0; +} + +.highlight pre code[class=language-javaScript]::before, +.highlight pre code[class="language-js"]::before { +content: "js"; +background: #f7df1e; +color: black; +} +.highlight pre code[class*='language-yml']::before, +.highlight pre code[class*='language-yaml']::before { +content: 'yaml'; +background: #f71e6a; +color: white; +} +.highlight pre code[class*='language-shell']::before, +.highlight pre code[class*='language-bash']::before, +.highlight pre code[class*='language-sh']::before { +content: 'shell'; +background: green; +color:white +} +.highlight pre code[class*='language-json']::before{ +content: 'json'; +background: dodgerblue; + color: #000000 +} +.highlight pre code[class*='language-python']::before, +.highlight pre code[class*='language-py']::before { +content: 'py'; +background: blue; +color: yellow ; +} +.highlight pre code[class*='language-css']::before{ +content: 'css'; +background: cyan; +color: black ; +} +.highlight pre code[class*='language-go']::before{ +content: 'Go'; +background: cyan; +color: royalblue ; +} +.highlight pre code[class*='language-md']::before, +.highlight pre code[class*='language-md']::before{ +content: 'Markdown'; +background: royalblue; +color: whitesmoke ; }