Better Seo and Images

This commit is contained in:
athul 2020-06-24 13:27:58 +05:30
parent 17a1d3b640
commit 03a155de82
4 changed files with 122 additions and 4 deletions

View file

@ -13,5 +13,4 @@
<script> <script>
feather.replace() feather.replace()
</script> </script>
{{- end }} {{- end -}}

View file

@ -4,7 +4,7 @@
{{- $title := ( .Title ) -}} {{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}} {{- $siteTitle := ( .Site.Title ) -}}
{{- if .IsHome -}} {{- if .IsHome -}}
<title>{{ $siteTitle }} {{ if isset .Site.Params "subtitle" }}- {{ .Site.Params.Subtitle }}{{ end }} </title> <title>{{ $siteTitle }} | Home </title>
{{- else -}} {{- else -}}
<title>{{ $title }} - {{ $siteTitle }}</title> <title>{{ $title }} - {{ $siteTitle }}</title>
{{- end -}} {{- end -}}
@ -14,10 +14,16 @@
{{- end -}} {{- end -}}
<meta name="viewport" content="width=device-width, initial-scale=1"> <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" -}} {{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}} {{ end -}}
<meta name="description" content="{{ $.Param "description" }}">
{{- template "_internal/opengraph.html" . -}} {{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}} {{- template "_internal/twitter_cards.html" . -}}
{{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}} {{ if and (isset .Site.Params "social") (isset .Site.Params "feathericonscdn") (eq .Site.Params.featherIconsCDN true) -}}

View file

@ -111,3 +111,49 @@ a:hover {
color: var(--darkMaincolor); color: var(--darkMaincolor);
background-color: blue; 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 ;
}

View file

@ -226,3 +226,70 @@ svg{
margin-left: 6px; margin-left: 6px;
background-color: #f9f2f4; 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 ;
}