Macros are special purpose keywords, that are expanded on conversion time. They are used to insert dynamic information, for example the current date or information about the document source.
A macro is represented by the %% chars followed by its name, as %%ctime.
|Macro Name||Expands to...||Example|
|%%siteUrl||Site Http Url||http://website.software-download.name/|
|%%siteName||Site Name||Web Site Software|
|%%url||post http url||http://website.software-download.name/quick-start-instructions/|
|%%ctime||The source text creation time|
|%%mtime||The source text modification time|
|%%toc||The document TOC (Table of Contents)|
- The macro name is case-sensitive,
- Macros are valid at the document Body and template file
- A macro can be used inside links and images marks
The %%toc macro expands to the document’s Table of Contents from h1,h2,h3… HTML tags. It is useful for you to specify exactly where you want the TOC to be placed. You can even use the macro more than one time and place the TOC at the end of the document also.
Full example (bold text are expanded macros):
This is the Web Site Software User Guide, converted to html by Web Site Software from the Markdown source text. The conversion was done at 2009-05-29 14:13:35, but the last change on the source document was made on 2009-05-30 06:43:14. Mastering Macros reside on the Markdown Syntax category.
(since Web Site Software version 9.05.29)