spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Crosslinks should not include .html

Open philwebb opened this issue 3 years ago • 5 comments

Eg:

read the "getting-started.html" and "using.html" sections

in https://docs.spring.io/spring-boot/docs/2.6.x/reference/html/features.html#features

philwebb avatar Nov 15 '22 19:11 philwebb

Unfortunately, there are still quite a few other .html links in the multi-page docs. Asciidoctor manages to use the title of the section to which we're linking in the single-page docs. It would be good to find a way to get that to work in the multi-page docs as well without having to provide the link text manually.

wilkinsona avatar Nov 18 '22 14:11 wilkinsona

This seems to be the problem:

image

https://docs.asciidoctor.org/asciidoc/latest/macros/inter-document-xref/

I'm trying to find a workaround.

mhalbritter avatar Nov 23 '22 11:11 mhalbritter

I got an answer here: https://asciidoctor.zulipchat.com/#narrow/stream/279644-users.2Fasciidoctorj/topic/.E2.9C.94.20Link.20titles.20in.20multipage.20crossreferences

Looks like the << ... >> syntax is deprecated and even when using xref we have to make sure to satisfies all the rules. Going to take a look if this is feasible for us.

mhalbritter avatar Nov 24 '22 08:11 mhalbritter

Dan Allen said:

You can't get automatic titles across separate documents (unless you are using AsciiDoc with Antora).

mhalbritter avatar Nov 24 '22 09:11 mhalbritter

Workaround would be to add the title by hand to all xrefs which have no explicit title. Downside is that then the title in the link can differ from the linked section, if the section is renamed and the link stays at the old title.

mhalbritter avatar Nov 24 '22 09:11 mhalbritter

We might be able to hack something on out custom backend in the meantime

philwebb avatar Jan 10 '23 21:01 philwebb

There's no easy way to do this with the backend so I think we should just live with it until the Antora migration.

philwebb avatar Nov 08 '23 21:11 philwebb