Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Better support for multiple packages #1277

Merged
merged 8 commits into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions doc/invoking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ The following options are available:
Reserved for future use (output documentation in DocBook XML
format).

.. option:: --base-url=<url>

Base url for static assets (eg. css, javascript, json files etc.).
When present, static assets are not copied. This option is useful
when creating documentation for multiple packages, it allows to have
a single copy of static assets served from the given url.

.. option:: --source-base=<url>
--source-module=<url>
--source-entity=<url>
Expand Down
6 changes: 6 additions & 0 deletions haddock-api/haddock-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ library
, ghc-paths ^>= 0.1.0.9
, haddock-library ^>= 1.9.0
, xhtml ^>= 3000.2.2
, parsec ^>= 3.1.13.0

-- Versions for the dependencies below are transitively pinned by
-- the non-reinstallable `ghc` package and hence need no version
Expand Down Expand Up @@ -93,6 +94,8 @@ library
Haddock.Parser
Haddock.Utils
Haddock.Utils.Json
Haddock.Utils.Json.Types
Haddock.Utils.Json.Parser
Haddock.Backends.Xhtml
Haddock.Backends.Xhtml.Decl
Haddock.Backends.Xhtml.DocMarkup
Expand Down Expand Up @@ -169,6 +172,8 @@ test-suite spec
Haddock.Types
Haddock.Utils
Haddock.Utils.Json
Haddock.Utils.Json.Types
Haddock.Utils.Json.Parser
Haddock.Version
Paths_haddock_api
Haddock.Backends.Hyperlinker.ParserSpec
Expand All @@ -180,6 +185,7 @@ test-suite spec
, haddock-library ^>= 1.9.0
, xhtml ^>= 3000.2.2
, hspec >= 2.4.4 && < 2.8
, parsec ^>= 3.1.13.0
, QuickCheck >= 2.11 && ^>= 2.14

-- Versions for the dependencies below are transitively pinned by
Expand Down
2 changes: 1 addition & 1 deletion haddock-api/resources/html/haddock-bundle.min.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion haddock-api/resources/html/js-src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ function onDomReady(callback: () => void) {
onDomReady(() => {
document.body.classList.add('js-enabled');
styleMenu.init();
quickJump.init();
detailsHelper.init();
let head = document.getElementById('head');
let baseURL = ".";
if (head !== null) {
baseURL = head.getAttribute('data-base-url') || '.';
}
quickJump.init(baseURL);
});
Loading