add robots.txt

pull/224/head
Septs 2021-12-24 09:17:56 +08:00
parent 55899078e7
commit d00cadb11d
No known key found for this signature in database
GPG Key ID: 6EC3B9D7E6EE828F
3 changed files with 11 additions and 2 deletions

View File

@ -29,7 +29,7 @@ jobs:
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-hugomod-
- name: Build `mtf.wiki`
run: hugo --minify
run: hugo --minify --environment production
- name: Deploy `mtf.wiki`
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'

View File

@ -6,9 +6,10 @@ defaultContentLanguage = "zh-cn"
defaultContentLanguageInSubdir = true
hasCJKLanguage = true
copyright = "©{year} MtF Wiki. All Rights Reserved"
copyright = "© {year} MtF Wiki. All Rights Reserved"
timeout = 10000
enableEmoji = true
enableRobotsTXT = true
paginate = 13
rssLimit = 100

View File

@ -0,0 +1,8 @@
User-agent: *
{{- if eq hugo.Environment "production" }}
{{- range $.Site.Home.AllTranslations }}
Sitemap: {{ .RelPermalink }}sitemap.xml
{{- end }}
{{- else }}
Disallow: /
{{- end }}