Documentation ¶
Overview ¶
The template uses the function "code" to inject program source into the output by extracting code from files and injecting them as HTML-escaped <pre> blocks.
The syntax is simple: 1, 2, or 3 space-separated arguments:
Whole file:
{{code "foo.go"}}
One line (here the signature of main):
{{code "foo.go" `/^func.main/`}}
Block of text, determined by start and end (here the body of main):
{{code "foo.go" `/^func.main/` `/^}/`
Patterns can be `/regular expression/`, a decimal number, or "$" to signify the end of the file.
Directories ¶
Path | Synopsis |
---|---|
codelab
|
|
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
|
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999). |
talks
|
|
Click to show internal directories.
Click to hide internal directories.