Warning, /education/cantor/thirdparty/discount-2.2.6-patched/theme.1 is written in an unsupported language. File is not indexed.

0001 .\"     %A%
0002 .\"
0003 .Dd January 23, 2008
0004 .Dt THEME 1
0005 .Os MASTODON
0006 .Sh NAME
0007 .Nm theme
0008 .Nd create a web page from a template file
0009 .Sh SYNOPSIS
0010 .Nm
0011 .Op Fl C Pa option-flags
0012 .Op Fl c Pa options
0013 .Op Fl d Pa root
0014 .Op Fl E
0015 .Op Fl f
0016 .Op Fl o Pa file
0017 .Op Fl p Pa pagename
0018 .Op Fl t Pa template
0019 .Op Fl V
0020 .Op Pa textfile
0021 .Sh DESCRIPTION
0022 The
0023 .Nm
0024 utility takes a
0025 .Xr markdown 7 Ns -formatted
0026 .Pa textfile
0027 .Pq or stdin if not specified,
0028 compiles it, and combines it with a
0029 .Em template
0030 .Po
0031 .Pa page.theme
0032 by default
0033 .Pc
0034 to produce a web page.   If a path to the 
0035 template is not specified,
0036 .Nm
0037 looks for 
0038 .Pa page.theme
0039 in the current directory, then each parent directory up to the
0040 .Pa "document root"
0041 .Po
0042 set with
0043 .Fl d
0044 or, if unset, the
0045 .Em "root directory"
0046 of the system.
0047 .Pc
0048 If 
0049 .Pa page.theme
0050 is found,
0051 .Nm
0052 copies it to the output, looking for 
0053 .Em "<?theme action?>"
0054 html tags and processing the embedded
0055 .Ar action 
0056 as appropriate.
0057 .Pp
0058 .Nm
0059 processes the following actions:
0060 .Bl -tag -width "include("
0061 .It Ar author
0062 Prints the author name(s) from the
0063 .Xr mkd_doc_author 3
0064 function.
0065 .It Ar body
0066 Prints the formatted
0067 .Xr markdown 7
0068 input file.
0069 .It Ar date
0070 Prints the date returned by
0071 .Xr mkd_doc_date 3
0072 or, if none, the
0073 date the input file was last modified.
0074 .It Ar dir
0075 Prints the directory part of the pagename
0076 .It Ar include Ns Pq Pa file 
0077 Prints the contents of 
0078 .Pa file .
0079 .Xr Markdown 7
0080 translation will
0081 .Em NOT
0082 be done on this file.
0083 .It Ar source
0084 The filename part of the pagename.
0085 .It Ar style
0086 Print any stylesheets
0087 .Pq see Xr mkd-extensions 7
0088 found in the input file.
0089 .It Ar title
0090 Print the title returned by
0091 .Xr mkd_doc_title 3 ,
0092 or, if that does not exist, the source filename.
0093 .It Ar version
0094 Print the version of
0095 .Xr discount 7
0096 that this copy of theme was compiled with.
0097 .El
0098 .Pp
0099 If input is coming from a file and the output was not set with the
0100 .Fl o
0101 option, 
0102 .Nm writes the output to
0103 .Pa file-sans-text.html
0104 .Pq if 
0105 .Ar file
0106 has a 
0107 .Pa .text
0108 suffix, that will be stripped off and replaced with 
0109 .Pa .html ;
0110 otherwise a
0111 .Pa .html
0112 will be appended to the end of the filename.)
0113 .Pp
0114 The options are as follows:
0115 .Bl -tag -width "-o file"
0116 .It Fl d Pa root
0117 Set the 
0118 .Em "document root"
0119 to
0120 .Ar root
0121 .It Fl E
0122 Normally
0123 theme will not expand
0124 .Pa "<?theme body?>"
0125 or
0126 .Pa "<?theme toc?>"
0127 in the
0128 .Pa "<head>"
0129 section, or
0130 .Pa "<?theme style?>"
0131 in the
0132 .Pa "<body>"
0133 section, but the
0134 .Fl E
0135 option overrides this and allows expansions everywhere.
0136 .It Fl f
0137 Forcibly overwrite existing html files.
0138 .It Fl o Pa filename
0139 Write the output to
0140 .Ar filename .
0141 .It Fl p Ar path
0142 Set the pagename to
0143 .Ar path .
0144 .It Fl t Ar filename
0145 Use
0146 .Ar filename
0147 as the template file.
0148 .El
0149 .Sh RETURN VALUES
0150 The
0151 .Nm
0152 utility exits 0 on success, and >0 if an error occurs.
0153 .Sh SEE ALSO
0154 .Xr markdown 1 ,
0155 .Xr markdown 3 ,
0156 .Xr markdown 7 ,
0157 .Xr mkd-extensions 7 .
0158 .Sh AUTHOR
0159 .An David Parsons
0160 .Pq Li orc@pell.portland.or.us