# This is the config file for the documentation generator. # (c) 2016 Andreas Rumpf # Feel free to edit the templates as you need. If you modify this file, it # might be worth updating the hardcoded values in packages/docutils/rstgen.nim split.item.toc = "20" # too long entries in the table of contents wrap around # after this number of characters doc.section = """

$sectionTitle

$content
""" doc.section.toc = """
  • $sectionTitle
  • """ doc.section.toc2 = """ """ # Chunk of HTML emitted for each entry in the HTML table of contents. # Available variables are: # * $desc: the actual docstring of the item. # * $header: the full version of name, including types, pragmas, tags, etc. # * $header_plain: like header but without HTML (and without pragmas, tags, etc.), # for attribute embedding. # * $itemID: numerical unique entry of the item in the HTML. # * $itemSym: short symbolic name of the item for easier hyperlinking. # * $itemSymEnc: quoted version for URLs or attributes. # * $itemSymOrID: the symbolic name or the ID if that is not unique. # * $itemSymOrIDEnc: quoted version for URLs or attributes. # * $name: reduced name of the item. # * $uniqueName: name with parameters for routine types or $name for others. # * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used). doc.item = """
    $header
    $deprecationMsg $desc $seeSrc
    """ # A wrapper of a few overloaded `doc.item`s with the same basic name # * $header_plain - see above # * $overloadGroupName - the anchor for this whole group # * $content - string containing `doc.item`s themselves doc.item2 = """
    $content
    """ # Chunk of HTML emitted for each entry in the HTML table of contents. # See doc.item for available substitution variables. # This is used for TOC items which are not overloadable (e.g. types). # `$header_plain` would be too verbose here, so we use $name. doc.item.toc = """
  • $name
  • """ # This is used for TOC items which are grouped by the same name (e.g. procs). doc.item.tocTable = """
  • $header_plain
  • """ # HTML rendered for doc.item's seeSrc variable. Note that this will render to # the empty string if you don't pass anything through --git.url. Available # substitutaion variables here are: # * $commit: branch/commit to use in source link. # * $devel: branch to use in edit link. # * $path: relative path to the file being processed. # * $line: line of the item in the original source file. # * $url: whatever you did pass through the --git.url switch (which also # gets variables path/line replaced!) doc.item.seesrc = """ Source   Edit   """ doc.deprecationmsg = """
    $label $message
    """ doc.toc = """ """ doc.body_toc_groupsection = """
    Group by:
    """ @if boot: # This is enabled with the "boot" directive to generate # the compiler documentation. # As a user, tweak the block below instead. # You can add your own global-links entries doc.body_toc_group = """
        Dark Mode
    Search:
    $body_toc_groupsection $tableofcontents
    $seeSrc
    $deprecationMsg

    $moduledesc

    $content
    """ @else # keep in sink with other `doc.body_toc_group` or better, refactor doc.body_toc_group = """
        Dark Mode
    Search:
    Group by:
    $tableofcontents
    $seeSrc
    $deprecationMsg

    $moduledesc

    $content
    """ @end doc.body_toc %= "${doc.body_toc_group}" # should only be used for boot doc.body_no_toc = """ $moduledesc $content """ # $1 - number of listing in document, $2 - language (e.g. langNim), $3 - anchor doc.listing_start = "" doc.listing_end = "" # * $analytics: Google analytics location, includes

    $title

    $subtitle $content
    $analytics """