mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Request: Support external links in SUMMARY.md

Open phrohdoh opened this issue 5 years ago • 6 comments

It'd be nice if mdbook didn't generate a file structure for URIs in SUMMARY.md that begin with a protocol.

For example, I have the following:

- [Modding](./modding/README.md)
    - [Utility](./modding/utility/README.md)
        - [Wiki](https://github.com/OpenRA/OpenRA/wiki/Utility)
        - [Mod & Map Linting](./modding/utility/linting.md)

The [Wiki] item would, ideally, be a link to https://github.com/OpenRA/OpenRA/wiki/Utility.

Edit 1: Probably start impl-ing this at https://github.com/rust-lang-nursery/mdBook/blob/c3284a2ae90573b89f6976b21c0f8e244ffc941c/src/book/summary.rs#L401

phrohdoh avatar May 13 '19 13:05 phrohdoh

The (completely valid) alternative is to make this a non-goal of mdbook.

Apply a 'WONTFIX' label of some sort to this ticket and, if/when this comes up in the future, indicate that summary items can not be external links (users should then put external links directly on a page).

phrohdoh avatar May 13 '19 14:05 phrohdoh

As a user I think this would be surprising. If I were clicking around in the ToC pane and reading in the main pane, then clicked an innocuous-looking ToC entry and suddenly got shunted to a completely different page/site where I didn't have the ToC any more, I'd be a bit discombobulated.

I'd also suggest changing the issue title to Request: Support external links in SUMMARY.md to make it clearer what you're talking about.

mrec avatar May 14 '19 17:05 mrec

You raise a good point regarding surprising readers!

Perhaps the best solution here is explicitly deciding to not support this.

phrohdoh avatar May 15 '19 01:05 phrohdoh

I think supporting this is a good idea.

There could be a flag, defaulting to true, that gives external links the little arrow-in-square icon indicating an external link. Everyone on the web knows what that means.

kriskeillor avatar Jun 01 '19 20:06 kriskeillor

I don't really mind you decide not to support this, but at least it'd be nice to support external links somewhere else in the page :o

mimoo avatar Mar 01 '22 01:03 mimoo

+1 for this

I would like to link to issue trackers outside of the scope of the book that I'm writing for.

a1994sc avatar Jul 22 '24 11:07 a1994sc