mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-22 05:00:39 +00:00
add basic robots.txt
This commit is contained in:
parent
1cb88d9e6c
commit
7231c988b7
@ -1,5 +1,6 @@
|
|||||||
- ENHANCEMENT
|
- ENHANCEMENT
|
||||||
- allow setting some common meta elements e.g. description and authors
|
- allow setting some common meta elements e.g. description and authors
|
||||||
- prevent duplicate title on the start page
|
- prevent duplicate title on the start page
|
||||||
|
- add basic robots.txt
|
||||||
- BUGFIX
|
- BUGFIX
|
||||||
- dont display duplicate title on home page
|
- dont display duplicate title on home page
|
||||||
|
@ -51,6 +51,8 @@ outputs:
|
|||||||
- HTML
|
- HTML
|
||||||
- ATOM
|
- ATOM
|
||||||
|
|
||||||
|
enableRobotsTXT: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
geekblogSubtitle: Subtitle to describe your blog
|
geekblogSubtitle: Subtitle to describe your blog
|
||||||
geekblogToC: 3
|
geekblogToC: 3
|
||||||
|
@ -198,6 +198,9 @@ outputs:
|
|||||||
- HTML
|
- HTML
|
||||||
- ATOM
|
- ATOM
|
||||||
|
|
||||||
|
# Required if you want to render robots.txt template
|
||||||
|
enableRobotsTXT: true
|
||||||
|
|
||||||
params:
|
params:
|
||||||
# (Optional, default 6) Set how many table of contents levels to be showed on page.
|
# (Optional, default 6) Set how many table of contents levels to be showed on page.
|
||||||
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
|
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
|
||||||
|
@ -20,16 +20,16 @@
|
|||||||
<meta name="author" content="{{ delimit . "," }}">
|
<meta name="author" content="{{ delimit . "," }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title -}}</title>
|
<title>{{ if not (eq .Kind "home") }}{{ partial "title" . }} | {{ end }}{{ .Site.Title }}</title>
|
||||||
|
|
||||||
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
<link rel="icon" href="{{ "favicon/favicon-32x32.png" | relURL }}" type="image/x-icon">
|
||||||
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
|
<link rel="stylesheet" href="{{ "main.min.css" | relURL }}" media="screen">
|
||||||
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
|
<link rel="stylesheet" href="{{ "custom.css" | relURL }}" media="screen">
|
||||||
|
|
||||||
{{ with .OutputFormats.Get "rss" -}}
|
{{ with .OutputFormats.Get "atom" }}
|
||||||
{{ 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 }}
|
||||||
|
|
||||||
{{ "<!--" | safeHTML -}}
|
{{ "<!--" | safeHTML }}
|
||||||
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
|
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
|
||||||
{{- "-->" | safeHTML }}
|
{{- "-->" | safeHTML }}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<footer class="gblog-footer">
|
<footer class="gblog-footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="flex flex-wrap align-center">
|
<div class="flex flex-wrap align-center">
|
||||||
|
{{ with .OutputFormats.Get "atom" }}
|
||||||
<span class="gblog-footer__item">
|
<span class="gblog-footer__item">
|
||||||
<svg class="icon rss_feed"><use xlink:href="#rss_feed"></use></svg>
|
<svg class="icon rss_feed"><use xlink:href="#rss_feed"></use></svg>
|
||||||
<a href='{{ "atom.xml" | relURL }}' class="gblog-footer__link">Feed</a>
|
<a href='{{ .Permalink | relURL }}' class="gblog-footer__link">Feed</a>
|
||||||
</span>
|
</span>
|
||||||
|
{{ end }}
|
||||||
<span class="gblog-footer__item">
|
<span class="gblog-footer__item">
|
||||||
<svg class="icon email"><use xlink:href="#email"></use></svg>
|
<svg class="icon email"><use xlink:href="#email"></use></svg>
|
||||||
<a href='{{ "contact" | relURL }}' class="gblog-footer__link">Contact</a>
|
<a href='{{ "contact" | relURL }}' class="gblog-footer__link">Contact</a>
|
||||||
|
3
layouts/robots.txt
Normal file
3
layouts/robots.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
User-agent: *
|
||||||
|
|
||||||
|
Sitemap: {{ "/sitemap.xml" | absURL }}
|
Loading…
Reference in New Issue
Block a user