mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 15:52:15 +00:00
43 lines
820 B
Text
43 lines
820 B
Text
|
# 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
|
||
|
|
||
|
|
||
|
|