Skip to content

Commit cc2a160

Browse files
author
Alistair Turnbull
committed
Fix the command that illustrates Nancy's search order
1 parent f7ee01f commit cc2a160

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Cookbook.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,15 @@ Note that there is only one menu fragment (the main menu is the same for every p
129129

130130
Now consider how Nancy builds the page whose URL is `Places/Vladivostok/index.html`. Assume the source files are in the directory `source`. This page is built from `source/Places/Vladivostok/index.nancy.html`, whose contents is `$include(template.in.html)`. According to the rules given in the [Operation](README.md#operation) section of the manual, Nancy will look first for files in `source/Places/Vladivostok`, then in `source/places`, and finally in `source`. Hence, the actual list of files used to assemble the page is:
131131

132-
132+
* `source/breadcrumb.in.html`
133+
* `source/logo.in.html`
134+
* `source/menu.in.html`
135+
* `source/path-to-root.in.sh`
136+
* `source/Places/breadcrumb.in.html`
137+
* `source/Places/Vladivostok/breadcrumb.in.html`
138+
* `source/Places/Vladivostok/main.in.html`
139+
* `source/Places/Vladivostok/title.in.txt`
140+
* `source/template.in.html`
133141

134142
For the site’s index page, the file `index/logo.in.html` will be used for the logo fragment, which can refer to the larger graphic desired.
135143

Cookbook.nancy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Note that there is only one menu fragment (the main menu is the same for every p
4646

4747
Now consider how Nancy builds the page whose URL is `Places/Vladivostok/index.html`. Assume the source files are in the directory `source`. This page is built from `source/Places/Vladivostok/index.nancy.html`, whose contents is `$run(head,-c-1,tests/test-files/cookbook-example-website-src/Places/Vladivostok/index.nancy.html)`. According to the rules given in the [Operation](README.md#operation) section of the manual, Nancy will look first for files in `source/Places/Vladivostok`, then in `source/places`, and finally in `source`. Hence, the actual list of files used to assemble the page is:
4848

49-
$expand{$run(env,NANCY_TMPDIR=/tmp/cookbook-dest.$$,sh,-c,rm -rf ${NANCY_TMPDIR} && DEBUG="*" PYTHONPATH=. python -m nancy --path Places/Vladivostok tests/test-files/cookbook-example-website-src ${NANCY_TMPDIR} 2>&1 | grep Found | cut -d " " -f 4 | sort | uniq | sed -e 's|^'\''tests/test-files/cookbook-example-website-src\(.*\)'\''$|* `source\1`|' && rm -rf ${NANCY_TMPDIR})}
49+
$expand{$run(env,NANCY_TMPDIR=/tmp/cookbook-dest.$$,sh,-c,rm -rf ${NANCY_TMPDIR} && DEBUG=yes PYTHONPATH=. python3 -m nancy --path Places/Vladivostok tests/test-files/cookbook-example-website-src ${NANCY_TMPDIR} 2>&1 | grep Found | cut -d " " -f 2 | sort | uniq | sed -e "s|^'tests/test-files/cookbook-example-website-src\(.*\)'$|* \`source\1\`|" && rm -rf ${NANCY_TMPDIR})}
5050

5151
For the site’s index page, the file `index/logo.in.html` will be used for the logo fragment, which can refer to the larger graphic desired.
5252

0 commit comments

Comments
 (0)