THEME(1)

πŸ“¦
version 3.0.1.2 Β· 2 versions
, in alpine 3.24

πŸ’– 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 the mkd_doc_author(3) function.
  • body β€” prints the formatted markdown(7) input file.
  • date β€” prints the date returned by mkd_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 of file. 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 (see mkd-extensions(7)) found in the input file.
  • title β€” prints the title returned by mkd_doc_title(3), or, if that does not exist, the source filename.
  • version β€” prints the version of discount(7) that this copy of theme was 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 to root.
  • -E β€” normally theme will not expand <?theme body?> or <?theme toc?> in the <head> section, or <?theme style?> in the <body> section, but the -E option 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 to filename. (The synopsis writes it as -o file.)
  • -p path β€” set the pagename to path. (Synopsis calls it -p pagename.)
  • -t filename β€” use filename as 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