ash-project / ash_hq

The Ash Framework homepage and documentation site.
MIT License
48 stars 26 forks source link

fix: Links to guides are now correctly converted to AshHQ links on import #78

Closed sevenseacat closed 1 year ago

sevenseacat commented 1 year ago

As discussed on Slack - turns out to be a really simple fix (but this doesn't solve the potential underlying architectural issue).

Something unexpected was happening when setting the library_version_id of imported guides, which meant that the current_library was nil. If the current_library was nil, the Highlighter post-processor was ignoring links instead of rewriting them to be AshHQ links.

Before (the security guide link):

Screenshot 2023-01-25 at 1 51 14 pm

After: link is correctly rewritten to http://(domain)/docs/guides/ash/latest/security .

Have tested by running a full import locally and all of the other broken links I noticed have also been fixed.