View Source 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

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

TODO

  • [ ] More automated tests
  • [ ] Correct types in table of contents (mark macros correctly)
  • [ ] Handle extra files
  • [ ] Check all types
    • [ ] Index
      • [x] Module
      • [x] Type
      • [x] Function
      • [x] Macro
      • [x] Protocol
      • [x] Callback
      • [x] Exception
      • [ ] Guide
      • [ ] Section
    • [ ] table of contents
      • [x] Type
      • [x] Function
      • [ ] Macro
      • [x] 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
  • [x] Hide layout only if navigator.userAgent.includes('Dash/')
    • [x] Check zeal for UA

installation

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, github: "LostKobrakai/ex_doc_docset"}
  ]
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.