-
Notifications
You must be signed in to change notification settings - Fork 1
Text replacement
Dave Nicolette edited this page Jun 2, 2017
·
2 revisions
Docgen replaces placeholders in the template document with values obtained from a list of key-value pairs, where the key matches the text of the placeholder.
For example, assume a plain text template document contains the following line:
Welcome to beautiful ::class location::!
Further assume the following key-value pair is defined in the database (the exact format is not important for this example):
"class location" => "Portland, Oregon"
When docgen processes the file, it will replace the text "::class location::" in the template document with the value "Portland, Oregon" from the database. The resulting file will contain the line:
Welcome to beautiful Portland, Oregon!
Text replacement works for all supported file types.