Why nothing runs at serve time
A page that runs is a page that can fail. A page that is a file cannot fail, and cannot fail is the claim.
The claim of this subject
Content in, files out, one build. That triple is what every later lesson shapes.
A generator takes content and writes pages. The writing is the whole point, and the point is that the pages are files before they are served.
About 1 min of reading
Write the triple
Write the input
Before you run it, say out loud what it will print. Then open the answer.
Write the output
world
\n' > /tmp/p.html; wc -c < /tmp/p.htmlBefore you run it, say out loud what it will print. Then open the answer.
Write the cost
Before you run it, say out loud what it will print. Then open the answer.
A page that runs is a page that can fail. A page that is a file cannot fail, and cannot fail is the claim.
Content in, files out, one build. That triple is what every later lesson shapes.
Content is data with a shape. A shape that is written down is a shape a reader can change.
Files, not answers. Files are what a server can hand out without asking the generator.
The cost is paid once at build. Paying once is what makes serving free.