updatevars | project | technical | examples | links | # |
project - summary - reasoning - usage Features: - expandvars - updatevars - simplevars - attribvars - printerfriendly textmode version - sitemapstyle - filelist ToDo - sitemap styles - section styles - setting vars - alternatives - section hi:light - topic hi:light - two sitefiles - staging files - debug enable
(C) 2004-04-24 |
updatevars = marking updateable content<!--mksite:updatevars--> <!--mksite:noupdatevars-->
The option can be selected in the sitefile, per default we do
update content prefixed with these comment variables.
input: derived This is the preferred method of updating content in the htm file. The comment itself is invisible while a default representation is visible (usually in a similar formatting). The expansion will cut away all text following the comment variable up to the next markup or endofline. That text is replaced with the value of the selected variable. If no variable of such a name exists then nothing is done and the default value persists.
The variant expansions can be selected via "?" after the
colon instead of the "=". This syntax derives directly
from shell variable name expansion which knows the two
variants as well The variant expansion scheme has two modes. In the direct variant expansion we pick the same as for the expandvars being hyphenated for toplevel variables ("$title" and "$author") and parenthesed for secondary variables ("$modified" and "$issued"). This is not recommended to be used with modern mksite.sh, and instead prefix the variable name with some whitespace to select the core expansion. (The direct variant expansion is a heritage of simplevars).
The variant expansion scheme with some prefix inside the
comment markup does only use the core expansion for
variable values. The variant value is internally already
(a) lowercased from the original value and (b) any
additional markup has been cut out. This core modification
of variants is very useful to paste variable values into
|