Fix docs directory structure to reflect diátaxis#520
Hidden character warning
Fix docs directory structure to reflect diátaxis#520davidekete wants to merge 18 commits intocanonical:mainfrom
Conversation
Meson and docs-validation updates to reflect new docs dir structure.
|
@davidekete, thanks for submitting this! To fix the spellcheck and one cross-doc link, I submitted a PR against your branch: davidekete#3 |
Fix paths to reference docs for link and spellcheck.
Thank you. I just merged the PR. |
|
Two notes:
|
I think the most important one would be the |
…tps://github.com/davidekete/netplan into Fix-docs-directory-structure-to-reflect-Diátaxis
@rkratky, I have renamed them as |
|
@slyon, I believe this is good to be merged. Could you please have a look? |
slyon
left a comment
There was a problem hiding this comment.
Sorry for the late review and thank you very much for your contribution to Netplan!
In general this looks fine, but it also breaks lots of references around the internet. I wonder if the benefit is great enough to justify that? I see that have this new structure would improve the maintainability going forward... @rkratky what's your stance on this? Is there any recommendation from the technical authors?
I'd be fine with merging it once we fix the broken internal references (see inline comments of certian "howto" files) and the outside-references to netplan-yaml, using anchor redirects. This would be the bare minimum, I guess.
| redirects = { | ||
| 'README.md': '/', | ||
| 'netplan': '/netplan-yaml', | ||
| 'netplan': '/reference/netplan-yaml', |
There was a problem hiding this comment.
todo: I'm still missing a redirect for the old netplan-yaml here.
In the end, we need to be able to redirect something like https://netplan.io/reference#routing to https://netplan.readthedocs.io/en/latest/reference/netplan-yaml/#routing
I was unable to make the sphinx-reredirects redirect any anchor (i.e. the URI fragment after the hashtag #routing), but this is important for the netplan-yaml page, as there are lots of deep links aroud the internet pointing to specific configuration and we would break all of them if we don't support redirecting to the proper anchor.
@rkratky Do you have any idea how anchor redirects could be solved?
There was a problem hiding this comment.
When you say you're missing a redirect for the old netplan-yaml, what do you mean @slyon?
Yes, that's my main concern, too.
I believe the benefits outweigh the negatives (I suggested this change). |
@rkratky ACK, fair enough. Would you be able to assist with the critical redirects for the |
Yes, I hope. Just acknowledging now because I'm not sure if I'll get to it this week, i.e. before the Sprints. |
Hi @rkratky, @slyon, I could work on this myself to speed up the process. I just need a little more context to what needs to be done and i'll get righ on it. |
@davidekete Thanks, that's appreciated! See my inline comments above, there are some easy TODOs in there for you, e.g. fixing the include path for the "reuse" documents. After that we need to find a way to allow Sphinx/ReadTheDocs to redirect URLs with an anchor, like this: https://netplan.io/reference#routing to https://netplan.readthedocs.io/en/latest/reference/netplan-yaml/#routing (preserving the "#routing" fragment). I don't know how this works and wasn't able to find a way when quickly looking into that. Furthermore, there seems to be a merge conflict in |
…-docs-directory-structure-to-reflect-Diátaxis
Hi @slyon, I fixed most of the Todos. I tried to find a way to allow Sphinx/ReadTheDocs to redirect URLs with an anchor, but I couldn't; this is new territory for me. Could you explain the background of the problem? and If you figure out a way to solve it, could you explain that to me too? |
There was a problem hiding this comment.
Hi @slyon, I fixed most of the Todos. I tried to find a way to allow Sphinx/ReadTheDocs to redirect URLs with an anchor, but I couldn't; this is new territory for me. Could you explain the background of the problem? and If you figure out a way to solve it, could you explain that to me too?
Thanks for solving the merge conflicts and the ../reuse/... imports! I left two more inline-comments, about an (apparently?) unrelated change and an additional redirect.
Regarding the anchor redirect, that you asked about:
We need to find a way to redirect URLs with an anchor, like this: https://netplan.io/reference#routing or https://netplan.readthedocs.io/en/latest/netplan-yaml/#routing to the new URL at https://netplan.readthedocs.io/en/latest/reference/netplan-yaml/#routing – The important part being the #routing fragment/section here.
There are lots of links out on AskUbuntu, Launchpad and other places, that are deep links into the reference document (netplan-yaml) and we need to make sure those are still working after this PR is merged.
I don't know how this works either and wasn't able to find a way when quickly looking into that. I hope for @rkratky experience here.
Just dropping in to mention I'm not ignoring this PR/discussion -- I just couldn't find the time for investigating these two weeks. I hope to get back to normal next week. |
|
Hi guys, just bumping this issue. I tried my hand at it and posted the issue on StackOverflow for help. Have you guys had any luck on your end? @rkratky @slyon |
…-docs-directory-structure-to-reflect-Diátaxis
|
Hi @rkratky, @slyon. I was able to work around the issue by Implementing a custom redirect template that:
Let me know if you run into any issues testing. |
* Moves topic files to resp. sub-dirs * Updates docs validation and manpage building scripts * Adds internal redirects to keep all links functional Note: Most work on this done by @davidekete in PR canonical#520. Thanks!
|
I submitted #567, which implements these changes -- it was simpler to start a new PR to avoid conflicts after such a long time has passed. Apologies for taking so criminally long with responding to this and finalizing it. All credit for the actual work goes to @davidekete. In the new PR, I only added internal redirects to handle all of the changes and added some minor updates. I really don't have a good excuse for neglecting this for so long, and I'm truly sorry. Somehow, I just kept postponing the work, and then it got totally out of hand. Something always came up that seemed more pressing at the time. Again, my apologies. ...... I believe the new PR is good to be merged. I tested the redirects as I could, and I didn't find any case where it wouldn't work as expected. |
Description
Addresses canonical/open-documentation-academy#125
Checklist
make checksuccessfully.make check-coverage).