THEME(1)

πŸ“¦
version 3.0.2.0 Β· 2 versions
, in arch rolling, debian bookworm, debian trixie, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– THEME(1) πŸ’–

okay bestie, welcome to the General Commands Manual page for theme β€” yes that's the whole manual name, we're fancy here πŸŽ€. Strap in, this one's actually so useful.


🌸 NAME 🌸

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: theme grabs a markdown(7)-formatted textfile β€” or stdin if you don't hand it a file, no pressure β€” compiles it, and smushes it together with a template to cook up a whole web page. default template? that's page.theme, iconic.

if you don't tell it where the template lives, theme goes on a little scavenger hunt πŸ”: first page.theme in the current directory, then each parent directory all the way up to the document root. and the document root is set with -d, or β€” if you never set it β€” it's just the root directory of the system. once it finds page.theme, theme copies it straight into the output, hunting for <?theme action?> html tags and processing whatever action is embedded in there. slay.

πŸŽ€ the actions it processes

  • author β€” prints the author name(s), straight from the mkd_doc_author(3) function.
  • body β€” prints the formatted markdown(7) input file. the main character, honestly.
  • date β€” prints the date that mkd_doc_date(3) gives back 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. and heads up: Markdown(7) translation will NOT be done on this file. not even a little.
  • source β€” the filename part of the pagename.
  • style β€” print any stylesheets (peep mkd-extensions(7)) found in the input file.
  • title β€” prints the title from mkd_doc_title(3) or, if that doesn't exist, the source filename. fallback queen πŸ‘‘.
  • version β€” print the version of discount(7) that this copy of theme was compiled with.

if the input is coming from a file and you never set the output with the -o option, it writes the output to file-sans-text.html β€” like, 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. cute, right?

πŸ’… the options, fr fr

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 all that and allows expansions everywhere.
  • -f β€” forcibly overwrite existing html files. no asking, no mercy πŸ’€.
  • -o filename β€” write the output to filename.
  • -p path β€” set the pagename to path.
  • -t filename β€” use filename as the template file.

πŸ’€ RETURN VALUES πŸ’€

theme exits 0 on success, and >0 if an error occurs. that's it, that's the whole drama.


πŸ‘‘ SEE ALSO πŸ‘‘

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


🫢 AUTHOR 🫢

David Parsons (orc@pell.portland.or.us) β€” legend behavior, honestly.


and that's the whole page bestie!! this one's from MASTODON, dated January 23, 2008 β€” vintage, but she ate and left no crumbs πŸ“βœ¨ go build something cute, ily, bye πŸ’œ