1THEME(1)                  BSD General Commands Manual                 THEME(1)
2

NAME

4     theme — create a web page from a template file
5

SYNOPSIS

7     theme [-C option-flags] [-c options] [-d root] [-E] [-f] [-o file]
8           [-p pagename] [-t template] [-V] [textfile]
9

DESCRIPTION

11     The theme utility takes a markdown(7)-formatted textfile (or stdin if not
12     specified,) compiles it, and combines it with a template (page.theme by
13     default) to produce a web page.   If a path to the template is not speci‐
14     fied, theme looks for page.theme in the current directory, then each par‐
15     ent directory up to the document root (set with -d or, if unset, the root
16     directory of the system.)  If page.theme is found, theme copies it to the
17     output, looking for <?theme action?> html tags and processing the embed‐
18     ded action as appropriate.
19
20     theme processes the following actions:
21
22     author    Prints the author name(s) from the mkd_doc_author(3) function.
23
24     body      Prints the formatted markdown(7) input file.
25
26     date      Prints the date returned by mkd_doc_date(3) or, if none, the
27               date the input file was last modified.
28
29     dir       Prints the directory part of the pagename
30
31     include(file)
32               Prints the contents of file.  Markdown(7) translation will NOT
33               be done on this file.
34
35     source    The filename part of the pagename.
36
37     style     Print any stylesheets (see mkd-extensions(7)) found in the
38               input file.
39
40     title     Print the title returned by mkd_doc_title(3), or, if that does
41               not exist, the source filename.
42
43     version   Print the version of discount(7) that this copy of theme was
44               compiled with.
45
46     If input is coming from a file and the output was not set with the -o
47     option, writes the output to file-sans-text.html (if) file has a .text
48     suffix, that will be stripped off and replaced with .html; otherwise a
49     .html will be appended to the end of the filename.)
50
51     The options are as follows:
52
53     -d root  Set the document root to root
54
55     -E       Normally theme will not expand <?theme body?> or <?theme toc?>
56              in the <head> section, or <?theme style?> in the <body> section,
57              but the -E option overrides this and allows expansions every‐
58              where.
59
60     -f       Forcibly overwrite existing html files.
61
62     -o filename
63              Write the output to filename.
64
65     -p path  Set the pagename to path.
66
67     -t filename
68              Use filename as the template file.
69

RETURN VALUES

71     The theme utility exits 0 on success, and >0 if an error occurs.
72

SEE ALSO

74     markdown(1), markdown(3), markdown(7), mkd-extensions(7).
75

AUTHOR

77     David Parsons (orc@pell.portland.or.us)
78
79MASTODON                       January 23, 2008                       MASTODON
Impressum