Git Product home page Git Product logo

standalone-haddock's Introduction

standalone-haddock

standalone-haddock generates standalone haddock Haskell documentation.

When you simply run cabal haddock, the resulting HTML documentation contains hyperlinks to other packages on your system. As a result, you cannot publish it on the internet (well, you can, but the links will be broken).

standalone-haddock takes several packages for which you want to publish documentation. It generates documentation for them with proper links:

  • links to identifiers inside this package set are relative
  • links to identifiers from external packages lead to hackage

Thus the resulting directory with HTML files is relocatable and publishable.

TL;DR: it just works. See the haskell-suite documentation for an example output.

Usage

Usage: standalone-haddock [--package-db DB-PATH] -o OUTPUT-PATH [PACKAGE-PATH]

Available options:
  -h,--help                Show this help text
  --package-db DB-PATH     Additional package database
  -o OUTPUT-PATH           Directory where html files will be placed

PACKAGE-PATH is the path to the (unpacked) package โ€” i.e. a directory with a .cabal file.

For example:

standalone-haddock -o doc haskell-names haskell-packages haskell-src-exts hse-cpp cabal/Cabal

NOTE: dependencies of every package need to be already installed in the system with documentation (even those dependencies that themselves belong to the current package set). If they are installed in a non-standard package database (e.g. if you use sandboxes), use the --package-db option.

Cabal dependency

The program only builds with (unreleased) Cabal 1.17 which you can get from github.

I spent some time trying to make it compatible with Cabal 1.16 (see Cabal-1.16 branch), but the API seems to have changed too much.

If you seriously care about this, feel free to send a patch, but it's really easier just to install Cabal HEAD.

standalone-haddock's People

Contributors

unkindpartition avatar joeyadams avatar knsd avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.