MycroftAI / documentation

Mycroft.AI documentation for all public facing technical components.
https://mycroft.ai/documentation
Apache License 2.0
80 stars 90 forks source link

Relative link in MD is resolved in GH context when creating HTML page #225

Closed ceich closed 2 years ago

ceich commented 2 years ago

Describe the bug My fix for #223 in #224 seemed reasonable, but when the MD was converted to HTML, the relative link was turned into:

https://github.com/MycroftAI/documentation/blob/master/docs/using-mycroft-ai/customizations/wake-word/README.md#switching-wake-word-listeners

Instead of:

https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/customizations/wake-word#switching-wake-word-listeners

To Reproduce Steps to reproduce the behavior:

  1. Use MD link syntax to target a relative link, e.g. ../sibling-folder/some-page#some-fragment
  2. Build HTML
  3. Find that the relative link has been resolved in the GH context, not the target context
  4. Clicking the link yields GH's 404 page

Expected behavior The relative link is preserved in the conversion process.

ceich commented 2 years ago

Well, there are plenty of relative links in the source, but they all:

  1. Add the .md extension or end in /, which implies adding README.md
  2. ~Do not include a fragment/anchor~ FALSE: see here

It looks like 1. is the culprit in the case of #224.

krisgesling commented 2 years ago

Closed by #226