Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary links to secondary files #3842

Closed
finanalyst opened this issue Mar 28, 2021 · 9 comments
Closed

Primary links to secondary files #3842

finanalyst opened this issue Mar 28, 2021 · 9 comments
Labels
docs Documentation issue (primary issue type)

Comments

@finanalyst
Copy link
Collaborator

Fragile links to virtual files

I have referenced this problem before, but I think I have a definite list. A full list can be seen on Error Report in the section on Links to non-existent files. Whilst this section has been considerably improved and contains all Secondary files, there are also some non-existent files that are due to typos, and not due to Documentable.

A primary file exists under the doc/ directory in this repository. Actually within the doc/Language, doc/Type, doc/Programs and doc/Native sub-directories.

A secondary file is generated from primary files by Documentable, and then rendered into html. Secondary pod6 files are placed by Documentable in the doc/syntax, doc/routine, from which they are rendered into HTML.

These links are fragile because changes in Primary files may lead to the non-generation of Secondary files.

The algorithm for generating a Secondary file is not documented anywhere. So it is not even possible to warn Primary file editors about what not to do. (Several issues in this Repository relating to breaking changes my be due to this design decision)

Suggestions

Since all secondary files are generated from Primary files, links in Primary files to secondary files can be replaced with links to Primary files. This can be automated. In fact, I created a program to do this (and a PR was proposed).

At the time, however, there was no way to determine whether such a wide-scale change to the documentation would break the entire collection.

With the development of the error-report in Collection, all changes can be tested before being pushed to the repository. And the integrity of the links within the collection as a whole can be verified for the first time.

Since many external blogs also reference Secondary files, it is not proposed that Secondary files cease to be generated.

The proposal is to replace links in Primary files to virtual, non-existent, Secondary files with equivalent links to Primary files.

Removing such links will allow for easier changes to Primary files, and for changes to be tested on a regular basis, and for alternative representations of the Raku documentation to be developed.

@finanalyst finanalyst added the docs Documentation issue (primary issue type) label Mar 28, 2021
@JJ
Copy link
Contributor

JJ commented Mar 29, 2021

We don't have a spec for the doc URLs, either. So that should probably go first...

@finanalyst
Copy link
Collaborator Author

We don't have a spec for the doc URLs
@JJ I don't quite understand what a spec for doc URLs should look like.
How would such a spec differ from the POD6 spec for L<>?

@finanalyst
Copy link
Collaborator Author

@JJ Thinking about your comment more, how would a doc spec change the underlying problem in this issue?

@finanalyst
Copy link
Collaborator Author

finanalyst commented Apr 2, 2021

Started working on eliminating these errors. Helped find error in renderer, and improves multibyte utf8 recognition.

Mostly errors are author typos, but also clearly there have been editing changes in headers that are not transferred to targets (because the editor could not know where the targets are in the collection).

@JJ
Copy link
Contributor

JJ commented Apr 3, 2021

We need to know

  • What generates an URL and what does not
  • How the URLs are generated from names
  • Mapping content-URLs. That's right not a bit fuzzy.

@finanalyst
Copy link
Collaborator Author

@JJ I do know now, since I have had to reverse engineer Documentable and Pod::To::HTML in order to write ProcessedPod and Collection.
What form do you want this knowledge in? I could write something for you/the documentation. Where would you want it to appear?

@JJ
Copy link
Contributor

JJ commented Apr 4, 2021

There's a PR in the problem solving repo Maybe you can try and start from there, although you'll have to PR him to incorporate your changes to that PR.

@2colours
Copy link
Contributor

2colours commented Aug 5, 2023

@finanalyst can we get rid of this issue somehow?

@coke
Copy link
Collaborator

coke commented May 24, 2024

I think there are two items here: one is to review links to secondary items and see if they should be sent to primary ones instead. I think this is related to the #4468 - are we linking to individual methods or the routine pages? This is an ongoing editing question.

The other is, if we are linking to a secondary page that no longer exists, how do we cope? That is covered by the error report @finanalyst generates on his version of the doc site (but isn't published on prod). Fixing broken links has been on various tickets in the past, but I've just created a fresh one to track: #4476 (I don't think this existed when he opened this ticket in 2021)

With this, I think this ticket is closable.

@coke coke closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

4 participants