Skip to content

Commit 04b074d

Browse files
mavittarsius
authored andcommitted
make: Remove trailing _html from doc dir URLs
Fixes a broken link from [1] to non-existent page [2]. This is required because `makeinfo' expects linked HTML documents to be in a directory with a name ending "_html" (see [3]) but we don’t observe that convention. [1]: https://magit.vc/manual/ghub/Creating-a-Token.html [2]: https://magit.vc/manual/forge_html/Token-Creation.html [3]: https://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Splitting.html
1 parent 00c6a23 commit 04b074d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ HTML_FIXUP_CSS = '/<link rel="stylesheet" type="text\/css" href="\/assets\/pa
4646
\n<script src="/assets/js/simple-css-switch.js"></script>'
4747
HTML_FIXUP_ONLOAD = 's/<body lang="en">/<body lang="en" onload="simpleCssSwitch()">/'
4848
HTML_FIXUP_MENU = '/<\/body>/i<div id="s-css-s--menu"><\/div>'
49+
HTML_FIXUP_HREF = 's% href="\.\./\(.*\)_html/% href="../\1/%'
4950

5051
%.html: %.texi
5152
@printf "Generating $@\n"
@@ -57,7 +58,7 @@ HTML_FIXUP_MENU = '/<\/body>/i<div id="s-css-s--menu"><\/div>'
5758
@rm -rf $(PKG)
5859
@$(MAKEINFO) --html -o $(PKG)/ $(MANUAL_HTML_ARGS) $<
5960
@for f in $$(find $(PKG) -name '*.html') ; do \
60-
sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) $$f ; \
61+
sed -i -e $(HTML_FIXUP_CSS) -e $(HTML_FIXUP_ONLOAD) -e $(HTML_FIXUP_MENU) -e $(HTML_FIXUP_HREF) $$f ; \
6162
done
6263

6364
%.pdf: %.texi

0 commit comments

Comments
 (0)