-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hugolib/commands: Fix stuck server error issues
Fixes #11378
- Loading branch information
Showing
12 changed files
with
118 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
testscripts/unfinished/server__error_recovery_edit_config.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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 =' | ||
sleep 9 | ||
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 changes: 42 additions & 0 deletions
42
testscripts/unfinished/server__error_recovery_edit_content.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters