Skip to content

Commit 610e23e

Browse files
committed
docs: add canonical link for all generated man pages
Have it point to https://www.roundup-tracker.org/docs/man_pages/NAME.1.html for each of the 4 man pages.
1 parent ef2f430 commit 610e23e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ html_extra/man_pages/%.1.html: ../share/man/man1/%.1
2121
man --html=cat $< > $@
2222
# set max width for paragraphs
2323
sed -i '/<style/,/<\/style/s/\(p\s* { \)margin/\1max-width: 65ch; margin/' $@
24+
# add link rel=cannonical $@(F) takes
25+
# target $@ (html_extra/man_pages/x.1.html)
26+
# and returns file part (x.1.html)
27+
sed -i '/<head>/,/<\/head>/s#^<style#<link rel="canonical" href="https://www.roundup-tracker.org/docs/man_pages/$(@F)">\n<style#' $@
2428
#man2html $< > $@
2529

2630
admin_help.html: ../roundup/admin.py

0 commit comments

Comments
 (0)