edoc_layout(3)

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

πŸ’– edoc_layout β€” the Erlang Module Definition ✨

okay so bestie, welcome to edoc_layout(3) πŸ’… this is the standard HTML layout module for EDoc β€” like, it's the one that actually makes your docs look cute in a browser. want the deets on how to use it? go see the edoc module, it's all there. 🫢


🌸 DESCRIPTION 🌸

See also: edoc. πŸ¦‹

(yes that's the whole thing, it's a short one, we love an efficient queen)


πŸŽ€ DATA TYPES πŸŽ€

okay so… literally nothing here bestie πŸ’€ no data types, empty section, but we respect it. moving on! ✨


πŸ‘‘ FUNCTIONS πŸ‘‘

  • module(Element, Options) -> term() β€” with when Element :: edoc:edoc_module(), Options :: options().

this is the layout function, the main character fr fr πŸ”₯

here are the Options to the standard layout, and yes we're going through every single one, no skipping, that's the rule πŸ’–

  • {index_columns, integer()} β€” says how many column pairs the function index tables get. default is 1. one and done. ✨
  • {pretty_printer, atom()} β€” controls how types and specs get pretty printed. if you pass erl_pp, it uses the Erlang pretty printer (the erl_pp module). the default is to do no pretty printing at all, which means β€” and I need you to brace yourself β€” lines can be very long. 😭 no wrapping, no mercy, just vibes.
  • {stylesheet, string()} β€” the URI used to reference your stylesheet. default is "stylesheet.css". and listen: if you pass an empty string, no stylesheet reference gets generated whatsoever. spicy 🌈
  • {sort_functions, boolean()} β€” if true, the detailed function descriptions are listed by name. if it's not true, they come out in the order they occur in the source file. default is true. iconic sorting behavior πŸ‘‘
  • {xml_export, Module::atom()} β€” names an xmerl callback module to use for exporting the documentation. see //xmerl/xmerl:export_simple/3 for the details. 🧚

See also: edoc:layout/2. 🫢


πŸ¦‹ CALLBACKS πŸ¦‹

  • module/2 β€” layout entrypoint. that's the door, bestie, everything walks through here πŸ’œ

ngl, if you're writing docs and something looks weird, it's probably a pretty printer thing. erl_pp is your friend. or don't β€” default means long lines and honestly? sometimes that's a mood. πŸ™ˆ

mwah πŸ’– this page brought to you by Ericsson AB, version edoc 1.5, and the date stamp edoc_layout(3) β€” periodt, that's a wrap bestie, go document something gorgeous βœ¨πŸŽ€πŸŒˆ

πŸ“¦ where this page comes from