dokuwiki-plugin-siteexport icon indicating copy to clipboard operation
dokuwiki-plugin-siteexport copied to clipboard

Anchor/Bookmark Html Links are not made at the anchor.

Open rgleason opened this issue 7 years ago • 0 comments

Gamma,

I feel badly about posting, because SiteExport is an important and valuable tool for OpenCPN releases: it creates the Html documentation. The dust has settled now on release of OpenCPN v4.6 and the Help file has been created with manual piecing together, but it worked, referencing an IndexMenu Plugin TOC page.

We've found that Internal Anchor/Bookmark Html Links are not made at the Anchor location. This is probably caused by the fact that Dokuwiki just uses the Headings as automatic anchor links, which is very handy in Dokuwiki, but when we export we need to have those links actually created in order for any Internal or External link with an Anchor/Bookmark to work.

Perhaps there is a setting we have missed? Thank you for making SiteExport!

An example


Site Export result:

'<a href="#ais_operating_controls" title="opencpn:opencpn_user_manual:toolbar_buttons:ais ?" class="wikilink1">AIS Operating Controls</a>'

`<h1>AIS Operating Controls</h1>`

Yet HTML requires at the Anchor/Bookmark location:

`<h1>AIS Operating Controls</h1>`

`<a href="#ais_operating_controls">Can be left empty</a>`

OR BETTER

`<h1  id="ais_operating_controls">AIS Operating Controls</h1>`

OR

`<h1 name="ais_operating_controls">AIS Operating Controls</h1>`

Same problem is occurring to External Page Anchor/Bookmark or "jump to" Links for the same reason.

Example from W3C https://www.w3schools.com/html/html_links.asp

Create an anchor/bookmark with id attribute at the location (Not done by SiteExport).

`<h2 id="C4">Chapter 4</h2>`

Then add a link to the anchor/bookmark from within the same page (OK)

`<a href="#C4">Jump to Chapter 4</a>`

OR Add a link to the anchor/bookmark from another page

`<a  href="html_demo.html#C4">Jump to Chapter 4</a>`

Differences in id and name attributes according to WC3 Because of its specification in the HTML DTD, the name attribute may contain character references. Thus, the value Dürst is a valid name attribute value, as is Dürst . The id attribute, on the other hand, may not contain character references. The "name" attribute allows richer anchor names (with entities). https://www.w3.org/TR/html4/struct/links.html#h-12.2.1

rgleason avatar Mar 19 '17 16:03 rgleason