Saturday, January 4, 2014 at 6:08 PM


Macros are delimited with percent signs inside angle brackets.

Example: <%somevalue%>.

Macros can have parameters, or just be JavaScript expressions.

You can define your own macros.

Example: <%includeHTTP ("")%>.

Here's an example page that uses several macros.

  • <%slogan%> -- returns one of 15 slogans.

  • <%now%> -- to say what time it is on the server.

  • <%text%> -- uses the text of the parent node to give the page a title.

  • <%pickleFlavor%> -- a custom attribute from the parent node.

A blog post with some more examples of macros.

You can also define your own macros.

Last built: Tue, Dec 9, 2014 at 3:29 PM

By Dave Winer, Saturday, January 4, 2014 at 6:08 PM. Ask not what the Internet can do for you.