edoc_doclet(3)

πŸ“¦
version 29.0.6 Β· 2 versions
, in ubuntu stonking

✨ edoc_doclet ✨

okay bestie, welcome to the edoc_doclet manual page β€” literally the standard doclet module for EDoc πŸŽ€ she's the one who actually turns your Erlang code into pretty HTML, and yes, she ate πŸ’…

fr fr, this is an Erlang module definition page. buckle up, we're going in.

🌸 NAME 🌸

edoc_doclet β€” the standard doclet module for EDoc. that's it, that's the name, iconic of her πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

See also: edoc.

like, go look at edoc too, bestie, they're a package deal 🫢


πŸ’œ DATA TYPES πŸ’œ

command()

command() :: doclet_gen() | doclet_toc().

these are the doclet commands β€” your girl's to-do list ✨

context()

context() ::
          #doclet_context{dir :: string(),
                          env :: edoc:env(),
                          opts :: [term()]}.

this is the context for doclets β€” it's giving "here's everything you need to know about where you are and what you're doing" 🏑

doclet_gen()

doclet_gen() ::
          #doclet_gen{sources :: [string()],
                      app :: no_app | atom(),
                      modules :: [module()]}.

a doclet command. yep. just a command. main character energy, minimal explanation πŸ’…

doclet_toc()

doclet_toc() ::
          #doclet_toc{paths :: [string()], indir :: string()}.

another doclet command β€” this one's the table-of-contents girly 🌈


πŸŽ€ FUNCTIONS πŸŽ€

run(edoc_doclet:command(), edoc_doclet:context()) -> ok.

Main doclet entry point. like, the front door. the red carpet. the moment everyone's been waiting for πŸ‘‘

also, go peek at the file edoc_doclet.hrl for the data structures that get used for passing parameters β€” that's where the receipts live 🧾

also also: check out edoc:layout/2 for layout-related options, and edoc:get_doc/2 for options related to reading source files πŸ“š

✨ Options ✨

  • {file_suffix, string()} β€” sets the suffix used for output files. the default is literally ".html" no cap πŸ“„
  • {hidden, boolean()} β€” if it's true, docs for hidden modules and functions get included too πŸ™ˆ. default is false.
  • {overview, edoc:filename()} β€” names the overview file. by default this doclet goes looking for a file called "overview.edoc" in the target directory πŸ”
  • {private, boolean()} β€” if it's true, docs for private modules and functions get included too 🀫. default is false.
  • {stylesheet, string()} β€” the URI used for referencing the stylesheet πŸ’… default is "stylesheet.css". if you pass an empty string, no stylesheet reference gets generated at all β€” zero, zilch, none, the HTML goes naked 😭
  • {stylesheet_file, edoc:filename()} β€” names the stylesheet file. by default this doclet uses "stylesheet.css" sitting in the priv subdirectory of the EDoc installation directory πŸ“. the named file will get copied to the target directory, so she's coming with you 🫢
  • {title, string()} β€” sets the title of the overview page 🏷️

⭐ CALLBACKS ⭐

run/2

Doclet entrypoint. yeah girl, that's the one ✨


lowkey reminder bestie: every option above? real. every default? real. don't come for me if you pass an empty {stylesheet, ""} and your page looks like a plain text file, I warned you πŸ’€

and that's the whole page, we're done, slay πŸŒˆπŸ’–

sign-off time: this gem came from Ericsson AB, it's part of edoc 1.5, and the page itself is edoc_doclet(3). periodt πŸ‘‘πŸ’…

πŸ“¦ where this page comes from