mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
add basic robots.txt
This commit is contained in:
parent
1cb88d9e6c
commit
7231c988b7
@ -1,5 +1,6 @@
|
||||
- ENHANCEMENT
|
||||
- allow setting some common meta elements e.g. description and authors
|
||||
- prevent duplicate title on the start page
|
||||
- add basic robots.txt
|
||||
- BUGFIX
|
||||
- dont display duplicate title on home page
|
||||
|
@ -51,6 +51,8 @@ outputs:
|
||||
- HTML
|
||||
- ATOM
|
||||
|
||||
enableRobotsTXT: true
|
||||
|
||||
params:
|
||||
geekblogSubtitle: Subtitle to describe your blog
|
||||
geekblogToC: 3
|
||||
|
@ -198,6 +198,9 @@ outputs:
|
||||
- HTML
|
||||
- ATOM
|
||||
|
||||
# Required if you want to render robots.txt template
|
||||
enableRobotsTXT: true
|
||||
|
||||
params:
|
||||
# (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/)
|
||||
|
@ -20,16 +20,16 @@
|
||||
<meta name="author" content="{{ delimit . "," }}">
|
||||
{{ 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="stylesheet" href="{{ "main.min.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 }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
|
||||
{{ "<!--" | safeHTML -}}
|
||||
{{ "<!--" | safeHTML }}
|
||||
Made with Geekblog theme https://github.com/xoxys/hugo-geekblog
|
||||
{{- "-->" | safeHTML }}
|
||||
|
@ -1,10 +1,12 @@
|
||||
<footer class="gblog-footer">
|
||||
<div class="container">
|
||||
<div class="flex flex-wrap align-center">
|
||||
{{ with .OutputFormats.Get "atom" }}
|
||||
<span class="gblog-footer__item">
|
||||
<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>
|
||||
{{ end }}
|
||||
<span class="gblog-footer__item">
|
||||
<svg class="icon email"><use xlink:href="#email"></use></svg>
|
||||
<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