opencpn-manuals / development

Part of opencpn-manuals/main, not maintained as a separate manual
1 stars 2 forks source link

Page links not working in browser #27

Closed rgleason closed 3 years ago

rgleason commented 3 years ago

file:///C:/Users/Rick/Documents/GitHub/development/modules/ROOT/intro-AboutThisManual.adoc fails

file:///C:/Users/Rick/Documents/GitHub/development/modules/ROOT/pages/intro-AboutThisManual.adoc works

Shouldn't these be changed in the nav.doc?

Applies to all the page links

leamas commented 3 years ago

Do you have such links in the html code?

leamas commented 3 years ago

Or, let's take it from the beginning: I suppose you are handling one of the errors reported by the full-linkcheck, right? So, which is the error reported which you are working with?

rgleason commented 3 years ago

Open this in your browser file:///C:/Users/Rick/Documents/GitHub/development/modules/ROOT/nav.adoc

https://github.com/rgleason/development/blob/main/modules/ROOT/nav.adoc

Neither works.

all the links generally need /pages/ added

Did you guys move the pages.

leamas commented 3 years ago

I certainly cannot open that link on linux... But somehting is very broken here: A link should never reference a .adoc file, it references the generated html files. These files lives in docs and have a completely different structure without any pages directory.

Again: what are you trying to do, really?

rgleason commented 3 years ago

in firefox we have an extension for asciidoc/antora (mike too) which alllows us to browse a facsimili that normally works properly with the links

leamas commented 3 years ago

But again: What are you working with? The broken links? If so, which link? If not, what are you trying to achieve?

leamas commented 3 years ago

BTW: The best preview option is to make a local build and point browser to docs/index.html

rgleason commented 3 years ago

Firefox extensions https://addons.mozilla.org/en-US/firefox/addon/asciidoctorjs-live-preview/ Asciidoctor.js Live Preview

https://newbedev.com/editor-with-live-preview-for-asciidoc It is available for other browsers, but that does not answer the issue with the broken links. Is there some antora code that is making up for the missing "pages" folder?

https://github.com/rgleason/development/tree/main/modules/ROOT/pages

leamas commented 3 years ago

Just drop this track, please. You might want to file this bug against the firefox extension.

Just live with the fact that the links don't work until they are properly generated by Antora. The links in the adoc pages are not real links, they are sort of templates or so. If you want to use the extension to check the layout, so fine. But if you want to check the links, make a local build.

leamas commented 3 years ago

In other words: as long as the links are OK when generated by Antora, the problem is with the plugin, right?

EDIT: Ah... that plugin is not an Antora plugin, it's an Asciidoctor one. Which explains why the links don't work. The link syntax is an Antora extension of the Asciidic syntax. so it's quite clear that this plugin cannot handle the links.

rgleason commented 3 years ago

Thank you. That explains it. I will file a bug asking that the plugin be optionally made compatible with Antora.

rgleason commented 3 years ago

For example, looking at the linkchecker output this URL is perfectly fine and works.. Does it need a trailing slash to help pass muster?

https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:opencpn_user_manual   
  Line: 35
  Code: 403 Forbidden
 To do: The link is forbidden! This needs fixing. Usual suspects: a missing
    index.html or Overview.html, or a missing ACL.

https://www.opencpn.org/ works https://opencpn.org/flyspray/ works https://github.com/leamas/bsb4_pi/ does not work this is an old plugin and it probably relates to https://github.com/opencpn-manuals/plugins/blob/main/manual/master-plugins/modules/ROOT/pages/plugins.adoc#charts

REDIRECTS https://opencpn-manuals.github.io/development add a trailing slash to speed up browsing.

https://github.com/rgleason/weatherfax_pi/releases/tag/v1.9.3-ov42-test Yes This link is lost now.

https://api.github.com/user%7Chttps://api.github.com/user 401
https://docs.github.com/en/rest/reference/users#get-the-authenticated-user OR https://docs.github.com/en/rest/reference/users Could this be it? Have to find the context.

There are many of these I think the linkchecker is being overly agressive here. https://www.cruisersforum.com/forums/f134/beta-test-technical-30929-6.html
Line: 1053 Code: 200 OK To do: Some of the links to this resource point to broken URI fragments (such as index.html#fragment). The following fragments need to be fixed: post2887625 Line: 1053

leamas commented 3 years ago

For example, looking at the linkchecker output this URL is perfectly fine and works.. Does it need a trailing slash to help pass muster?/etc/w3c/checklink.confrob

The problem with all urls reporting "Forbidden" seems to be robots.txt. Treat them as false positives, I'll try to get rid of them.

https://www.opencpn.org/ https://www.opencpn.org/ works https://opencpn.org/flyspray/ https://opencpn.org/flyspray/ works

https://github.com/leamas/bsb4_pi/ https://github.com/leamas/bsb4_pi/

That repo does not exist. I need to fix that.

does not work this is an old plugin and it probably relates to https://github.com/opencpn-manuals/plugins/blob/main/manual/master-plugins/modules/ROOT/pages/plugins.adoc#charts https://github.com/opencpn-manuals/plugins/blob/main/manual/master-plugins/modules/ROOT/pages/plugins.adoc#charts Same, see above> REDIRECTS https://opencpn-manuals.github.io/development https://opencpn-manuals.github.io/development add a trailing slash to speed up browsing.

We cannot do anything about this. Also a false positive.

https://github.com/rgleason/weatherfax_pi/releases/tag/v1.9.3-ov42-test https://github.com/rgleason/weatherfax_pi/releases/tag/v1.9.3-ov42-test Yes This link is lost now.

https://api.github.com/user%7Chttps://api.github.com/user https://api.github.com/user%7Chttps://api.github.com/user 401 https://docs.github.com/en/rest/reference/users#get-the-authenticated-user https://docs.github.com/en/rest/reference/users#get-the-authenticated-user OR https://docs.github.com/en/rest/reference/users https://docs.github.com/en/rest/reference/users Could this be it? Have to find the context.

Yes, these are things which I think you are the best person to fix.>

There are many of these I think the linkchecker is being overly agressive here. https://www.cruisersforum.com/forums/f134/beta-test-technical-30929-6.html https://www.cruisersforum.com/forums/f134/beta-test-technical-30929-6.html Line: 1053 Code: 200 OK

I need to squelch also these, agreed. For now, treat it as a false positive.

To do: Some of the links to this resource point to broken URI fragments (such as index.html#fragment). The following fragments need to be fixed: post2887625 Line: 1053

... which probably means that that post does not exist (?)>

leamas commented 3 years ago

Please look at the last build, it's happening right now. It has a much more clean list of issues, many of the items you mentioned above are gone. Too late to push to main, though..

rgleason commented 3 years ago
To do: Some of the links to this resource point to broken URI fragments
(such as index.html#fragment).
The following fragments need to be fixed: post2887625 Line: 1053

... which probably means that that post does not exist (?)>

No, actually the post seems to exist, and it is something we can't see.

leamas commented 3 years ago

IMHO, this is not about that links doesn't work in the browser i. e., this bug. The issue with non-working links in the asciidoctor plugin is as I see it sorted out, and we should close this bug. OK?

I will reply in #3, where this issue belongs.

leamas commented 3 years ago

Coming back to this one: Can it be closed?