summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/index.humanstxt.txt36
-rw-r--r--layouts/partials/author.html1
-rw-r--r--layouts/partials/head.html1
-rw-r--r--layouts/partials/team-member.html5
-rw-r--r--layouts/robots.txt2
5 files changed, 44 insertions, 1 deletions
diff --git a/layouts/index.humanstxt.txt b/layouts/index.humanstxt.txt
new file mode 100644
index 0000000..d8aec86
--- /dev/null
+++ b/layouts/index.humanstxt.txt
@@ -0,0 +1,36 @@
+{{/* TODO: Translate me */}}
+CONGRATULATIONS, you found my humans.txt file!
+
+───────────────────────────────────────────────────────────────────────────────
+
+ /* TEAM */
+{{ if site.Author }}
+ {{- $author_type := (printf "%T" site.Author) }}
+ {{- if (or (eq $author_type "map[string]string") (eq $author_type "map[string]interface {}")) }}
+ {{- range $i, $author := site.Author }}
+ {{- $name_type := (printf "%T" $author) }}
+ {{- if (eq $name_type "maps.Params") }}
+ {{- $.Scratch.Set "name" ($author.Get "name") }}
+ {{- $.Scratch.Set "email" ($author.Get "email") }}
+ {{- $.Scratch.Set "github" ($author.Get "github") }}
+ {{- $.Scratch.Set "location" ($author.Get "location") }}
+ {{- partial "team-member.html" . -}}
+ {{ else }}
+ {{- $.Scratch.Set "name" site.Author.name }}
+ {{- $.Scratch.Set "email" site.Author.email }}
+ {{- $.Scratch.Set "github" site.Author.github }}
+ {{- $.Scratch.Set "location" site.Author.location }}
+ {{- partial "team-member.html" . }}
+ {{- break -}}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+
+ /* SITE */
+
+ Last update: ???
+ Language: Russian, English
+ Doctype: HTML5
+ Standards: HTML5, CSS3, Open Graph protocol, Schema.org
+ Components: Hugo, jQuery, Ed Theme
diff --git a/layouts/partials/author.html b/layouts/partials/author.html
index 6de4feb..efb1dbd 100644
--- a/layouts/partials/author.html
+++ b/layouts/partials/author.html
@@ -22,6 +22,7 @@
{{- end }}
{{- end }}
{{- delimit ($.Scratch.GetSortedMapValues "names") ", " }}
+ {{- $.Scratch.Delete "names" -}}
{{- end }}
{{- end -}}
{{- end -}}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index da95aa5..abb4cbe 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -10,6 +10,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0,shrink-to-fit=no">
<link rel="canonical" href="{{ .Permalink }}">
+ <link type="text/plain" rel="author" href="{{ "humans.txt" | absURL }}">
<title>{{ block "title" . }}{{ if .IsHome }}{{ site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ site.Title }}{{ end }}{{ end }}</title>
<meta name="description" content="{{ $description }}">
diff --git a/layouts/partials/team-member.html b/layouts/partials/team-member.html
new file mode 100644
index 0000000..917e97f
--- /dev/null
+++ b/layouts/partials/team-member.html
@@ -0,0 +1,5 @@
+
+ Author: {{ .Name }}
+ Contact: {{ .Email }}
+ GitHub: {{ .Github }}
+ From: {{ .Location }}
diff --git a/layouts/robots.txt b/layouts/robots.txt
index dbc405e..c59438e 100644
--- a/layouts/robots.txt
+++ b/layouts/robots.txt
@@ -1,9 +1,9 @@
-# TODO: Does not work
{{- $url := urls.Parse ("/" | absURL) -}}
# robots.txt file for "{{ site.Title }}" website, {{ $url.Host }}
User-agent: *
{{- if eq (getenv "HUGO_ENV") "production" | or (eq site.Params.env "production") }}
Allow: /
+
# TODO: implement sitemap.xml
# Sitemap: {{ "stemap.xml" | absURL }}
{{- else }}