add robots.txt
parent
55899078e7
commit
d00cadb11d
|
@ -29,7 +29,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
|
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
|
||||||
restore-keys: ${{ runner.os }}-hugomod-
|
restore-keys: ${{ runner.os }}-hugomod-
|
||||||
- name: Build `mtf.wiki`
|
- name: Build `mtf.wiki`
|
||||||
run: hugo --minify
|
run: hugo --minify --environment production
|
||||||
- name: Deploy `mtf.wiki`
|
- name: Deploy `mtf.wiki`
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
|
|
@ -6,9 +6,10 @@ defaultContentLanguage = "zh-cn"
|
||||||
defaultContentLanguageInSubdir = true
|
defaultContentLanguageInSubdir = true
|
||||||
hasCJKLanguage = true
|
hasCJKLanguage = true
|
||||||
|
|
||||||
copyright = "©{year} MtF Wiki. All Rights Reserved"
|
copyright = "© {year} MtF Wiki. All Rights Reserved"
|
||||||
timeout = 10000
|
timeout = 10000
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
|
enableRobotsTXT = true
|
||||||
paginate = 13
|
paginate = 13
|
||||||
rssLimit = 100
|
rssLimit = 100
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
User-agent: *
|
||||||
|
{{- if eq hugo.Environment "production" }}
|
||||||
|
{{- range $.Site.Home.AllTranslations }}
|
||||||
|
Sitemap: {{ .RelPermalink }}sitemap.xml
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
Disallow: /
|
||||||
|
{{- end }}
|
Loading…
Reference in New Issue