-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change of repo title? #41
Comments
@finanalyst, Podlite is not a renderer for RakuDocV2. While there is some compatibility with the proposed version, it is very limited. i think, It would be better not to mention Podlite in this context at all. |
I like the new directory structure. I noted three issues:
Otherwise, it looks good. |
@thoughtstream These are all things I hadn't considered/thought about. Taking them in the numbering above
So, I think that option 3 should be mandated in the specification, namely if a file extension is explicit in a link, it should be left unchanged, but if no extension is explicit, the renderer is free to add or not add a file extension. As to options 1 & 2, my renderer can handle this by having two different renderers, one that explicitly adds the file format and one that does not. Items 2 & 3: I think that if I name each file distinctly, there should be no implication they are the same. |
On Sat, Jul 13, 2024 at 5:26 AM Richard Hainsworth ***@***.***> wrote:
@thoughtstream <https://github.com/thoughtstream> These are all things I
hadn't considered/thought about. Taking them in the numbering above
Item 1: This uncovers an ambiguity in RakuDoc! Sorry for the length of
this analysis.
- The source has something like L<test-file|path/test-file>. No file
format extension.
- The implication is that if the source is being rendered into .md
then the link should be to path/test-file.md, but if it is being
rendered to .html then it is to path/test-file.html.
FYI, this solves a problem I was having in the raku/doc trying to convert
our own .md sources to .rakudoc and then generating the .md for github
usage. Thanks!
…
- That is what happened here.
- But what is required is for the link to be written
L<test-file|path/test-file.rakudoc> and for the link to be unchanged.
(Currently, my software is adding the default format to all output files,
though this is not entirely the correct thing to do because modern HTML
servers will add .html to any route that needs it, so path/test-file
is in fact preferred.
- There seem to be three reasonable assumptions as to output
1. link to file without extension -> link to file with output
extension, eg test-file -> test-file.md if output is .md
2. link to file without extension -> link to file without extension,
eg test-file -> test-file whatever is the output (but this will create
problems with outputs that require a file format extension
3. link to file with extension -> link to file without a change of
extension.
So, I think that option 3 should be mandated in the specification, namely
if a file extension is explicit in a link, it should be left unchanged, but
if no extension is explicit, the renderer is free to add or not add a file
extension.
As to options 1 & 2, my renderer can handle this by having two different
renderers, one that explicitly adds the file format and one that does not.
Items 2 & 3:
My intention was to provide short files with different file format
extensions so that the renderer can download the texts and deal with them
appropriately, not to provide the same text with different outputs.
I think that if I name each file distinctly, there should be no
implication they are the same.
—
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMIUKYVBIZNLVBB5N3TN3ZMDXC7AVCNFSM6AAAAABKWZNYLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRWHAZTKNJWGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I understand what you’re trying to achieve and it’s certainly a useful capability However, I’m concerned that the proposed approach may be a little ETOOCLEVER. I can see that it would be useful for renderers to provide the option If I specify a link to an existing file or web target that explicitly
...then I definitely don’t want those URLs “helpfully” converted to Given that I may sometimes, but not always, want extensionless URLs It seems to me that a more predictable and less edge-cased approach In other words, when authors write outgoing links with That would still be an imperfect solution, of course. For example, you might
...without having its extension converted. So maybe there isn’t a way to achieve both “least surprise” and “do what I mean” Which seems to imply that the mechanism can’t be automatic. So I think that, if we specify anything at all, it should be
Ah. I had misunderstood the purpose of those various nearly identically named files.
Agreed. |
On 14 Jul 2024, at 03:25, thoughtstream ***@***.***> wrote:
For example, renderers could specify a “magical” pseudo-extension,
such as .??? or .ZZZ or .🧞, that is autoconverted to
the appropriate extension for the target output format.
Why not .* as it's not something you easily create on a file system, and it's very Raku like in as "whatever extension is applicable".
|
@thoughtstream @lizmat Another wrinkle to be considered. L<local file|local-file> is a link to a file in the same location, such as the RakuDoc sources in FYI, I distinguish between internal, local and external links. Internal is to the output of the file itself, eg a link to a heading, local - I described above. I absolutely agree that an external link, which starts with another schema, such as https;// should not change the file format. And the renderer did, so it is wrong. If we define |
I agree with @lizmat that However, I also agree with @finanalyst that changing the behaviour In a perfect world, I would advocate that we bite the bullet and But our mandate to be backwards compatible is an important one.
The remaining question is whether to also specify the I suspect not, but would like to hear other opinions. |
On 15 Jul 2024, at 05:45, thoughtstream ***@***.***> wrote:
I agree with @lizmat that .* would be a vastly better choice for
the “hey-change-this-to-whatever-you-want” pseudo-extension.
However, I also agree with @finanalyst that changing the behaviour
might be a huge backwards compatibility issue, especially for
the Raku documentation itself.
I think for the Raku documentation itself, this could almost be handled programmatically once.
|
I had wondered about that. But since I wasn't going to volunteer to do it, If the backwards compatibility issue isn't actually an issue, then I would seriously reconsider Specifically, whether we should specify: Renderers must always preserve verbatim every URL associated with an outgoing link. In that one case, the For example, if a link is specified ...and when the containing file is being rendered to HTML: If a RakuDoc document is being rendered into a format for which there is no corresponding file extension, Given that @lizmat appears to have volunteered to fix any effects on the Raku documentation set 😉 My own view is that it is potentially a much more explicit, cleaner, more predictable, more consistent, But I definitely want to hear other opinions before we decide. And before we do decide, I certainly want to know that someone – and not necessarily @lizmat – has actually |
If it's raku/doc, I volunteer for any cleanup there. |
Thanks for volunteering, @coke. Much appreciated! Now we just need to decide whether we actually want to bite that particular bullet. |
@thoughtstream @lizmat @coke Sorry for not responding quickly on this issue. I also wanted to see what @coke would say.
To avoid being ambiguous again and to clarify my own thinking, allow me to restate things we all know.RakuDoc has two (three?) components that refer to other resources
RakuDoc allows for three URI in a
Rendering implementation (I'll ignore text output because links are not possible)
The natural assumption is that for a collection of documents represented RakuDoc sources, they will all be rendered into the same output format, and so a renderer may apply the same naming rules to all The ambiguity arises because for local links, there is an occasional need to refer to a local resource that has a fixed output, eg Mandating links of the form After writing out this analysis, I am undecided about the benefits of requiring the extra Perhaps, we might say that The changes to the Raku/docs sources would need to look at the following forms (ignoring
|
We’ve had a severe storm here and I won’t be able to take further part in
this discussion until at least Thursday, when my internet provider
estimates my connection will finally be restored. Apologies.
|
I very much appreciate @finanalyst’s thorough analysis, However, I’m not entirely sure I agree with every aspect of it. The first is that, while the external/local/internal distinction is useful, Of course, I agree that the issue seems completely irrelevant to internal URLs, For example, suppose I am writing an e-book that I expect to render into all of Which suggests to me that not just local URLs, but any non-internal URL And I'm not even certain we can categorically exclude internal URLs either. The second point I think we need to consider is that I disagree with the statement: In my view, the ambiguity arises because the auto-extension mechanism is implicit. Which is why I believe we need a general rule: No URL ever has an extension added to it automatically. Plus a specific exception syntax: This explicit extension ( Then it doesn’t matter whether we can think of realistic cases where an external link In addition to future-proofing the language for the needs of people who are cleverer than us And that’s why I’m strongly in favour of specifying this approach. The reason I’m equally strongly in favour of mandating this approach is that making it And as @coke has generously volunteered to fix the largest source of breakage if we mandate But, as always, I’m happy to continue this discussion or to defer the decision as long as |
@thoughtstream @lizmat @coke Seems reasonable to me. I'll prepare some clarification text and raise a PR. |
@thoughtstream trying to think how to apply this approach practically to internal links. Currently we have |
Remember that the Then you could generate a document with internal links that adapt to the actual output format.
and then elsewhere:
Note that I’m not saying that’s a particular good idea, just that it’s possible |
So long as we are confining the |
I am strongly in agreement that magical |
@thoughtstream @lizmat
I've tidied the repo structure and re-written the README.
Would you please review the README.
The original is in C<.rakudoc> format and is rendered to C<.md> by RakuAST::RakuDoc::Render.
I am working on a github workflow and renderer container so that any .rakudoc source in the root is automatically rendered to <.md> if changed.
@lizmat I was wondering whether the repo should be renamed to RakuDocV2 instead of ...-GAMMA
@zag, would you like to add PodLite to the README as a Renderer based on Javascript? Even if there are some departures from RakuDoc v2 in Podlite, I think it is worth adding, so long as the principle differences are mentioned.
The text was updated successfully, but these errors were encountered: