ex_doc_docset

ExDoc formater to build a docset for Dash/Zeal

OTHER License

Downloads
136
Stars
3

ExDocDocset

Bundles :ex_doc documentation into a docset.

Docsets can be loaded into Dash(Mac OS) or Zeal(Win/Linux). Not yet tested with Zeal though.

Usage

In mix.exs add the formatters config:

def project do
  [
    app: :my_app,
    version: "0.1.0-dev",
    deps: deps(),

    # Docs
    docs: [
      formatters: ["html", "epub", ExDocDocset.Formatter.DocSet]
    ]
  ]
end

The formatter will then create a docset in your ./doc folder.

TODO

  • More automated tests
  • Correct types in table of contents (mark macros correctly)
  • Handle extra files
  • Check all types
    • Index
      • Module
      • Type
      • Function
      • Macro
      • Protocol
      • Callback
      • Exception
      • Guide
      • Section
    • table of contents
      • Type
      • Function
      • Macro
      • Callback
      • Section
  • Check in with the ex_doc team on how to make enough things public for the usecase:
    https://github.com/elixir-lang/ex_doc/issues/1548
  • Dash uses a newer optimized index: Figure out what's that about
  • Hide layout only if navigator.userAgent.includes('Dash/')
    • Check zeal for UA

Installation

If available in Hex, the package can be installed by adding ex_doc_docset to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_doc_docset, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_doc_docset.