Rewrite internal links in book page content to hero_books context #29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current Behavior
Image URLs in page content are rewritten to serve correctly via
rewrite_image_urls()inserver.rs. However, hyperlinks in markdown content pass through as-is — they still point to the original source repository locations (e.g., relative paths like../other-pageor absolute git URLs).Expected Behavior
All internal links in rendered page content should be rewritten to navigate within hero_books. For example:
../networking/setup.mdin a mycelium book should become/book/mycelium_networking/page/setupLocation
src/web/server.rs—rewrite_image_urls()function (lines ~3788-3824) handles images; a similarrewrite_content_links()is needed for<a href>tagstemplates/page.htmlline 111 —{{ content_html|safe }}renders the contentComplexity
Medium-high. Requires mapping source repo directory structures to hero_books page URL patterns.