Package: mkdocs-table-of-figures
mkdocs-table-of-figuresThis is a plugin that creates afigcaptionwith imagealtand lists all figures in files into a table of figures to be integrated inMarkdownpages for MkDocs.SetupInstalling using pip:pip install mkdocs-table-of-figuresConfigYou need to activate the plugin inmkdocs.yml:plugins:-table-of-figures:title_label:"Tableoffiguresofthedocumentation"# Optional --> Default : Table of Figuresfigure_label:"FigureN°"# Optional --> Default : Figuredescription_label:"Descriptionofthefigures"# Optional --> Default : Descriptiontemp_dir:"folder_name"# Optional --> Default : temp_figuresfile:"file_name"# Optional --> Default : figures.mdAs you can see, every option is optional, but if you want to generate a table of figures in another language than English, you will need to set up label options.Set at least one annex to use this plugin. If you don't have any annex, don't add this plugin to theMkDocsplugins list in the config filemkdocs.yml.title_label- This is the title (heading 1) given to the page that will contain the table of figures.figure_label- This is the name given to every figure right before the auto-incremented number.description_label- This is the label given to the column containing the description of each figure (alt text).temp_dir- The temporary directory used to store the table of figuresMarkdownfile before rendering to HTML. Only set this option if you already have atemp_figuresfolder in the root directory (same asmkdocs.yml), which you should not normally have.file- The name of theMarkdownfile containing the table of figures. Only set this option if you already have afigures.mdfile in thedocsdirectory.UsageThe plugin will only look forMarkdownimage composed of alt text. If you don't set any alt text for theMarkdownimage it will be ignored.There is two way of correctly rendering image stored within the docs:Using url from base: this mean that you give the full path from the docs directory starting with/like this/path/to/image/from/docs/image.pngWith the help ofmd_in_html: there is aMarkdownextension that you can set inmkdocs.ymlthat allow the plugin to placeMarkdowninHTMLwhich allow this plugin to letMkDocsset relative link in src attribute properly duringHTMLrenderingConcerning external images nothing change.You can set themd_in_htmloption like so :markdown_extensions:-md_in_htmlUsing the commandmkdocs buildormkdocs servewill trigger the plugin if it has been set correctly in the config file.SupportThis plugin currently supports markdown images andmermaiddiagrams.To make amermaiddiagram detectable by this plugin, you need to give it a title just below the end of the code block like this:``` mermaid
    sequenceDiagram
        participant Alice
        participant Bob
        Alice->>John: Hello John, how are you?
        loop Healthcheck
            John->>John: Fight against hypochondria
        end
        Note right of John: Rational thoughts <br/>prevail!
        John-->>Alice: Great!
        John->>Bob: How about you?
        Bob-->>John: Jolly good!
    ```
    The title of the mermaid diagram go hereIt will not work if there is a line between the diagram and the title.I highly recommend usingmkdocs-materialto usemermaiddiagrams. For more info aboutmermaiddiagrams, I invite you to checkmkdocs-materialandmermaid's official documentation.LicenseThis project is under MIT license. See thelicensefile for more details.See AlsoGitLab RepoMkDocs WebsiteMkDocs-Material DocumentationMermaid Documentation