mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
5bbe95f9c5
commit
cb6e27b32a
12 changed files with 143 additions and 84 deletions
42
testscripts/commands/server__error_recovery_edit_config.txt
Normal file
42
testscripts/commands/server__error_recovery_edit_config.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Test the hugo server command when adding an error to a config file
|
||||
# and then fixing it.
|
||||
|
||||
hugo server &
|
||||
|
||||
waitServer
|
||||
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1'
|
||||
|
||||
replace $WORK/hugo.toml 'title =' 'titlefoo'
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'failed'
|
||||
|
||||
replace $WORK/hugo.toml 'titlefoo' 'title ='
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1'
|
||||
|
||||
stopServer
|
||||
|
||||
-- hugo.toml --
|
||||
title = "Hugo Server Test"
|
||||
baseURL = "https://example.org/"
|
||||
disableKinds = ["taxonomy", "term", "sitemap"]
|
||||
-- layouts/index.html --
|
||||
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
|
||||
-- layouts/_default/single.html --
|
||||
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
|
||||
-- content/_index.md --
|
||||
---
|
||||
title: Hugo Home
|
||||
---
|
||||
-- content/p1/index.md --
|
||||
---
|
||||
title: P1
|
||||
---
|
||||
-- content/p2/index.md --
|
||||
---
|
||||
title: P2
|
||||
---
|
||||
-- static/staticfiles/static.txt --
|
||||
static
|
||||
|
||||
|
||||
|
42
testscripts/commands/server__error_recovery_edit_content.txt
Normal file
42
testscripts/commands/server__error_recovery_edit_content.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Test the hugo server command when adding a front matter error to a content file
|
||||
# and then fixing it.
|
||||
|
||||
hugo server &
|
||||
|
||||
waitServer
|
||||
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1'
|
||||
|
||||
replace $WORK/content/p1/index.md 'title:' 'titlecolon'
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'failed'
|
||||
|
||||
replace $WORK/content/p1/index.md 'titlecolon' 'title:'
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1'
|
||||
|
||||
stopServer
|
||||
|
||||
-- hugo.toml --
|
||||
title = "Hugo Server Test"
|
||||
baseURL = "https://example.org/"
|
||||
disableKinds = ["taxonomy", "term", "sitemap"]
|
||||
-- layouts/index.html --
|
||||
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
|
||||
-- layouts/_default/single.html --
|
||||
Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
|
||||
-- content/_index.md --
|
||||
---
|
||||
title: Hugo Home
|
||||
---
|
||||
-- content/p1/index.md --
|
||||
---
|
||||
title: P1
|
||||
---
|
||||
-- content/p2/index.md --
|
||||
---
|
||||
title: P2
|
||||
---
|
||||
-- static/staticfiles/static.txt --
|
||||
static
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue