jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

dirhtml-builder uses html-builder canonical link

Open casperdcl opened this issue 2 years ago • 1 comments

Describe the bug

context jupyter-book build --builder dirhtml

expectation

<link rel="canonical" href=".../chapter/" />

bug But instead this happens:

<link rel="canonical" href=".../chapter.html" />

problem This is a problem e.g. for people using utterances comments, vis. https://github.com/utterance/utterances/issues/474

Reproduce the bug

  1. jupyter-book create foo
  2. Edit foo/_config.yml to add html: baseurl: http://example.com
  3. jupyter-book build --builder dirhtml foo
  4. grep canonical foo/_build/dirhtml/markdown/index.html
<link rel="canonical" href="http://example.com/markdown.html" />

(instead of <link rel="canonical" href="http://example.com/markdown/" />)

List your environment

$ jupyter-book --version
Jupyter Book      : 0.15.1
External ToC      : 0.3.1
MyST-Parser       : 0.18.1
MyST-NB           : 0.17.2
Sphinx Book Theme : 1.0.1
Jupyter-Cache     : 0.6.1
NbClient          : 0.7.4

casperdcl avatar Oct 09 '23 20:10 casperdcl

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

welcome[bot] avatar Oct 09 '23 20:10 welcome[bot]