I have the same issue. I would like from a MD doc this doc.md to be able to link to another doc.md#some particular section.
But in the rendered HTML, I can see a h2 tag, and a <a> anchor, with an id like toc_13 or whatever, instead of having something like <a id="some particular section">, or <a id="some-particular-section"> or event <a id="SomeParticularSection">.
Linking to another doc.md#toc_13 is not readable, and not maintainable, since in the real document, the header can go from being the 13th, to the 16th or the 8th, or whatever.
I believe this is linked the automatic TOC generation capability. But in my case, generating a TOC for every document is not relevant. I'd rather need the possibility to link to a particular section in a document, in order to have a very simple wiki system.
By Administrator on 2013-04-18T09:36:59 (imported from GitLab project)
By Administrator on 2013-04-18T09:36:59 (imported from GitLab)
I solved this by writing a shell script that does 2 things:
it searches for cross-references like (../../some doc.md#some section inside it) and replaces them with (../../somedoc.md#toc_23). The number "23" is deduced by looking the index of header "some section inside it" in the "some doc.md" file. Yes, it's quite tedious.
as I want to be able to maintain my cross-references, and since gitlab MD rendering only knows absolute links (http://myserver/tree/master/etc.md) or completely relative paths (../../etc.md), I had to hack this, to be able to use semi-absolute paths, i.e. paths given with the root of my documentation as a reference. Examples: cross referencing "(doc/some directory/my doc.md)" in "(do/another directory/some subdirectory/another doc)" results in "(../../some directory/my doc.md)", which then allows for clicking the link within gitlab files.
Those two functionalities combined allow me to write wiki pages very simply.
Of course, this means that a have a source directory for my docs => this is where I edit my documentation, and a directory where this doc is "built" => this is where the doc is browsable within gitlab.
By Administrator on 2013-05-17T05:36:23 (imported from GitLab project)
By Administrator on 2013-05-17T05:36:23 (imported from GitLab)
Not exactly, I made a mistake saying it is the same issue. Mine is very specific, and I hope I explained it well. This one is, in fact, a bit fuzzy for me.
By Administrator on 2013-05-17T08:46:20 (imported from GitLab project)
By Administrator on 2013-05-17T08:46:20 (imported from GitLab)
Is this still an issue in 5.2 or latest master? Thanks for the issue report. Please reformat your issue to conform to the issue tracker guidelines found in our contributing guidelines.
By Administrator on 2013-06-14T01:03:13 (imported from GitLab project)
By Administrator on 2013-06-14T01:03:13 (imported from GitLab)