Debian Codegraph @

testscripts/server/server_render_static_to_disk.txt

raw
1 # Test the hugo server command.
2
3 # We run these tests in parallel so let Hugo decide which port to use.
4 hugo server --renderToMemory --renderStaticToDisk &
5
6 waitServer
7
8 httpget ${HUGOTEST_BASEURL_0}en/ 'Title: Hugo Server Test' $HUGOTEST_BASEURL_0
9 httpget ${HUGOTEST_BASEURL_0}mystatic.txt 'This is a static file in English.'
10
11 ! exists public/index.html
12 exists public/mystatic.txt
13
14 stopServer
15 ! stderr .
16
17 -- hugo.toml --
18 title = "Hugo Server Test"
19 baseURL = "https://example.org/"
20 disableKinds = ["taxonomy", "term", "sitemap"]
21 defaultContentLanguage = "en"
22 defaultContentLanguageInSubdir = true
23 [[module.mounts]]
24 source = 'static/en'
25 target = 'static'
26 lang = 'en'
27 [[module.mounts]]
28 source = 'static/fr'
29 target = 'static'
30 lang = 'fr'
31
32
33 [languages]
34 [languages.en]
35 languageName = "English"
36 title = "Hugo Server Test"
37 weight = 1
38 [languages.fr]
39 title = "Hugo Serveur Test"
40 languageName = "Français"
41 weight = 2
42
43 -- static/en/mystatic.txt --
44 This is a static file in English.
45 -- static/en/mystatic.txt --
46 This is a static file in English.
47 -- layouts/home.html --
48 Title: {{ .Title }}|BaseURL: {{ site.BaseURL }}|
49
50