Skip to content
Documentation API: caching, parsing, indexing and generating documentation
Perl 6 JavaScript CSS HTML CoffeeScript Perl
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Updates zef indices to get the latest versions Sep 3, 2019
.github/ISSUE_TEMPLATE Update issue templates Jul 19, 2019
docs Adapt document URL, close #46 Oct 11, 2019
lib Changes templates to Raku closes #54 Oct 15, 2019
resources Changes templates to Raku closes #54 Oct 15, 2019
t Address the problem of unexistent pod path Sep 20, 2019
.gitignore update affected classes to new behaviour, close #76, close #77 Aug 7, 2019
.travis.yml use jj docker container for testing Jun 8, 2019
LICENSE init using App::Mi6 May 22, 2019
META6.json Changes templates to Raku closes #54 Oct 15, 2019
Perl6-Documentable.iml Adds project file for Comma Aug 29, 2019 Adapt document URL, close #46 Oct 11, 2019 answer todo questions Aug 11, 2019

Documentable, the Perl6 Doc API CI Status Build Status artistic

In this repository you can find all logic responsible for generating the official documentation of Perl6 or any other repository that follows the same specification. Could be used for modules that include a substantial amount of documentation, for instance.

Table of contents


$ zef install Documentable

If you have already downloaded this repo,

$ zef install .


Before generating any documents you should execute:

documentable setup

in order to download the necessary files needed to generate the site (CSS, svg, ...). Alternatively, you can add your own. See default templates to get more information.

  bin/documentable setup [-y|--yes] -- Downloads default assets to generate the site
  bin/documentable start [--topdir=<Str>] [--conf=<Str>] [-v|--verbose] [-c|--cache] [-p|--primary] [-s|--secondary] [--search-index] [-i|--indexes] [-t|--typegraph] [-f|--force] [--highlight] [--typegraph-file=<Str>] [--highlight-path=<Str>] [--dirs=<Str>] [-a|--all] -- Start the documentation generation with the specified options
  bin/documentable update [--topdir=<Str>] [--conf=<Str>] [-v|--verbose] [--highlight] [--highlight-path=<Str>] -- Check which pod files have changed and regenerate its HTML files.
  bin/documentable clean -- Delete files created by "documentable setup"
  bin/documentable [-V|--version] -- Documentable version

    -y|--yes                  Always accept the operation (to use in scripts)
    --topdir=<Str>            Directory where the pod collection is stored
    --conf=<Str>              Configuration file
    -v|--verbose              Prints progress information
    -c|--cache                Enables the use of a precompiled cache
    -p|--primary              Generates the HTML files corresponding to primary objects
    -s|--secondary            Generates per kind files
    --search-index            Generates the search index
    -i|--indexes              Generates the index files
    -t|--typegraph            Write typegraph visualizations
    -f|--force                Force the regeneration of the typegraph visualizations
    --highlight               Highlights the code blocks
    --typegraph-file=<Str>    TypeGraph file
    --highlight-path=<Str>    Path to the highlighter files
    --dirs=<Str>              Dirs where documentation will be found. Relative to :$topdir
    -a|--all                  Equivalent to -t -p -k -i -s

See the CLI documentation to learn more.

Default templates

As you may have noticed, every page in the documentation follows the same template. You can get those templates in the releases page. I strongly recommend you to use the defaults, which can be set up executing

documentable setup

That command will download the latest assets tarfile in your directory. But what does this tar contain? Several things:

  • Necessary files to enable highlighting (highlights dir).
  • html dir containing several icons, graphics, etc. In this directory will be written all HTML documents generated by Documentable.
  • assets dir containing the style sheets used and JS code to enable search functionality.
  • template dir containing the default templates used.
  • Two files to run the server (app-start and
  • A Makefile to configure highlighting (make init-highlights) and easily start a dev server with make run.

Docker container

There is a specific docker container with all necessary dependencies (including the highlighter) at

You can see an example about how to use it here.

You can also download the container:

docker pull antoniogamiz/documentable

Then execute:

docker run -it --rm -v "$(pwd)":/documentable antoniogamiz/documentable

And now you can execute documentable and generate your documentation!

Note: Do not forget to add --highlight --highlight-path="/highlights" options if you want to get the code highlighted.

Installing dependencies


You need Perl 6 installed. You can install the Rakudo Perl 6 compiler by downloading the latest Rakudo Star release from


Zef is a Perl 6 module installer. If you installed Rakudo Star package, it should already be there. Feel free to use any other module installer for the modules needed (see below).

Mojolicious / Web Server (OPTIONAL)

Mojolicious is written in Perl 5, so assuming that you use cpanm, install this now:

    $ cpanm -vn Mojolicious


To generate the svg files for the typegraph representation you need to have installed graphviz. If you use Ubuntu/Debian:

    $ sudo apt-get install graphviz

Highlight (OPTIONAL)

This is necessary to appli highlighting to the code examples in the documentation. You can skip it, but have in mind that all code examples will appear with the same color (black).

You can set this up with the default Makefile (obtained using documentable setup):

    make init-highlights

SASS Compiler

To build the styles, you need to have a SASS compiler. You can either install the sass command

    $ sudo apt-get install ruby-sass

wget and tar

This programs are used by documentable setup to download the default assets and extract them. If you are on Ubuntu/Debian you will not have any problem (probably). If you are using Windows I recommend you to download the assets yourself from this link.


Question: Do I need to regenerate all pages when I have only changed one?

Answer: No, you can execute documentable update to only regenerate those pages affected by your changes.

Is not your question here? Then, please raise an issue.


Antonio Gámiz Delgado <@antoniogamiz>

Moritz Lenz <@moritz>

Jonathan Worthington <@jnthn>

Richard Hainsworth<@finanalyst>

Will Coleda <@coke>

Aleks-Daniel <@AlexDaniel>

Sam S <@smls>

Juan Julián Merelo Guervós <@JJ>

MorayJ <@MorayJ>

Zoffix <@zoffixnet>

Tison <@TisonKun>

Samantha Mcvey <@samcv>

Altai-Man <@Altai-man>

Tom Browder <@tbrowder>

Alexander Moquin <@Mouq>

Wenzel P. P. Peppmeyer <@gfldex>


Copyright 2019 Perl6 Team

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

This module uses some conventions: (this started in August, 2019, so previous work does not follow the conventions):

We use a ChangeLog generator to generate the file.

You can’t perform that action at this time.