Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix version picker links
also update Makefile to make apidocs depend on the tools
  • Loading branch information
rubys committed Jun 27, 2018
commit 5e9cf65e3035bbde6d0017db284aa74f29b88bf8
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,14 @@ gen-json = tools/doc/generate.js --format=json $< > $@
gen-html = tools/doc/generate.js --node-version=$(FULLVERSION) --format=html \
--analytics=$(DOCS_ANALYTICS) $< > $@

out/doc/api/%.json: doc/api/%.md
out/doc/api/%.json: doc/api/%.md tools/doc/generate.js
$(call available-node, $(gen-json))

out/doc/api/%.html: doc/api/%.md
out/doc/api/%.html: doc/api/%.md tools/doc/generate.js
$(call available-node, $(gen-html))

out/doc/api/all.html: $(filter-out out/doc/api/all.html, $(apidocs_html))
out/doc/api/all.html: $(filter-out out/doc/api/all.html, $(apidocs_html)) \
tools/doc/allhtml.js
$(call available-node, tools/doc/allhtml.js)

.PHONY: docopen
Expand Down
8 changes: 8 additions & 0 deletions tools/doc/allhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ const canonical = doc.querySelector('link[rel=canonical]');
canonical.setAttribute('href',
canonical.getAttribute('href').replace('_toc', 'all'));

const versionPickerLinks = doc.querySelectorAll('ol.version-picker a');
versionPickerLinks.forEach((versionPicker) => {
versionPicker.setAttribute(
'href',
versionPicker.getAttribute('href').replace('_toc', 'all')
);
});

doc.querySelector('body').setAttribute('id', 'api-section-all');

const owner = doc.ownerDocument;
Expand Down