aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/head.html
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-09-20 22:35:52 +0530
commitd26ecb989f5e5b9e06b34c106a3d391fd2910524 (patch)
tree5b2f2391eb682881c90930c040f260854b3f1936 /layouts/partials/head.html
First commit
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r--layouts/partials/head.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
new file mode 100644
index 0000000..565da2b
--- /dev/null
+++ b/layouts/partials/head.html
@@ -0,0 +1,30 @@
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <meta name="author" content="{{ .Site.Author.name }}">
+
+ <!-- conditionally load css, set title, description, etc -->
+ <!-- add or remove these if you want to have more types of pages -->
+ {{- if eq .Type "page" -}}
+ <meta name="description" content="{{ .Title }}">
+ <meta name="robots" content="index, follow">
+ <link rel="stylesheet" type="text/css" href="/css/index.css">
+ <title>{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</title>
+ {{ else if eq .Type "blog"}}
+ <meta name="description" content="{{ .Title }}">
+ <meta name="robots" content="index, follow">
+ <link rel="alternate" type="application/rss+xml" href="/blog/index.xml" title="">
+ <link rel="stylesheet" type="text/css" href="/css/blog.css">
+ <title>{{ .Title }} - {{ .Site.Params.blogTitle }}</title>
+ {{ else if eq .Type "lists"}}
+ <meta name="description" content="{{ .Title }}">
+ <meta name="robots" content="index, follow">
+ <link rel="stylesheet" type="text/css" href="/css/lists.css">
+ <title>{{ .Title }} - {{ .Site.Params.listsTitle }}</title>
+ {{ else if eq .Type "docs"}}
+ <meta name="description" content="{{ .Title }}">
+ <meta name="robots" content="index, follow">
+ <link rel="stylesheet" type="text/css" href="/css/docs.css">
+ <title>{{ .Title }} - {{ .Site.Params.docsTitle }}</title>
+ {{ end }}
+</head>