THEME(1)
π NAME π
okay bestie, welcome to THEME(1) from the General Commands Manual β this is the manual page for theme, and it creates a web page from a template file. periodt. π
theme β create a web page from a template file
β¨ SYNOPSIS β¨
theme [-C option-flags] [-c options] [-d root] [-E] [-f] [-o file]
[-p pagename] [-t template] [-V] [textfile]
πΈ DESCRIPTION πΈ
So hereβs the vibe: the theme utility takes a markdown(7)-formatted textfile (or stdin if you didnβt specify one), compiles it, and combines it with a template (page.theme by default) to produce a web page. Itβs giving βmy notes deserve a cute little websiteβ energy. π¦
If you donβt specify a path to the template, theme looks for page.theme in the current directory, then each parent directory up to the document root. The document root is set with -d or, if thatβs unset, itβs the root directory of the system. If page.theme is found, theme copies it to the output, looking for <?theme action?> html tags and processing the embedded action as appropriate. Obsessed with a template that does stuff for you, honestly. π«Ά
π the actions it processes π
authorβ prints the author name(s) from themkd_doc_author(3)function.bodyβ prints the formattedmarkdown(7)input file.dateβ prints the date returned bymkd_doc_date(3)or, if there isnβt one, the date the input file was last modified.dirβ prints the directory part of the pagename.include(file)β prints the contents offile. Markdown(7) translation will NOT be done on this file. Not me warning you twice. πsourceβ the filename part of the pagename.styleβ prints any stylesheets (seemkd-extensions(7)) found in the input file.titleβ prints the title returned bymkd_doc_title(3), or, if that does not exist, the source filename.versionβ prints the version ofdiscount(7)that this copy ofthemewas compiled with.
If input is coming from a file and the output was not set with the -o option, it writes the output to file-sans-text.html. If file has a .text suffix, that gets stripped off and replaced with .html; otherwise a .html gets appended to the end of the filename. Itβs a whole little filename glow-up. β¨
π the options (your flag besties) π
The options are as follows:
-d rootβ set the document root toroot.-Eβ normallythemewill not expand<?theme body?>or<?theme toc?>in the<head>section, or<?theme style?>in the<body>section, but the-Eoption overrides this and allows expansions everywhere. Itβs giving βlet me cookβ energy. π₯-fβ forcibly overwrite existing html files. Forcibly, bestie. π-o filenameβ write the output tofilename. (The synopsis writes it as-o file.)-p pathβ set the pagename topath. (Synopsis calls it-p pagename.)-t filenameβ usefilenameas the template file. (Synopsis calls it-t template.)
Also, the synopsis has these flags, and this page doesnβt give extra deets on them:
-C option-flagsβ appears in the synopsis; no extra explanation on this page.-c optionsβ same vibe: synopsis only, no extra explanation here.-Vβ also in the synopsis; no extra explanation on this page.
π RETURN VALUES π
The theme utility exits 0 on success, and >0 if an error occurs. Clean and simple, no cap. β
π¦ SEE ALSO π¦
π AUTHOR π
Jessica L. Parsons (orc@pell.portland.or.us) π«Ά
π cute little footer sign-off: source/version is MASTODON, date is January 23, 2008, and you just read THEME(1) β mwah, byeee! π
β¨
π¦ where this page comes from
- alpine 3.24: discount-doc 3.0.1.2-r1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms