mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
Create a struct with all of Hugo's config options
Primary motivation is documentation, but it will also hopefully simplify the code. Also, * Lower case the default output format names; this is in line with the custom ones (map keys) and how it's treated all the places. This avoids doing `stringds.EqualFold` everywhere. Closes #10896 Closes #10620
This commit is contained in:
55
testscripts/commands/server__edit_content.txt
Normal file
55
testscripts/commands/server__edit_content.txt
Normal file
@@ -0,0 +1,55 @@
|
||||
# Test the hugo server command when editing content.
|
||||
|
||||
# We run these tests in parallel so let Hugo decide which port to use.
|
||||
# Render to disk so we can check the /public dir.
|
||||
hugo server --renderToDisk &
|
||||
|
||||
waitServer
|
||||
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1' $HUGOTEST_BASEURL_0
|
||||
|
||||
ls public/p2
|
||||
cp stdout lsp2_1.txt
|
||||
ls public/staticfiles
|
||||
stdout 'static\.txt'
|
||||
cp stdout lsstaticfiles_1.txt
|
||||
|
||||
replace $WORK/content/p1/index.md 'P1' 'P1 New'
|
||||
|
||||
httpget ${HUGOTEST_BASEURL_0}p1/ 'Title: P1 New' $HUGOTEST_BASEURL_0
|
||||
|
||||
ls public/p2
|
||||
cp stdout lsp2_2.txt
|
||||
cmp lsp2_1.txt lsp2_2.txt
|
||||
ls public/staticfiles
|
||||
cp stdout lsstaticfiles_2.txt
|
||||
cmp lsstaticfiles_1.txt lsstaticfiles_2.txt
|
||||
|
||||
stopServer
|
||||
! stderr .
|
||||
|
||||
-- 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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user