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

Fix docs directory structure to reflect diátaxis #520

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

davidekete
Copy link
Contributor

@davidekete davidekete commented Sep 24, 2024

Description

Addresses canonical/open-documentation-academy#125

Checklist

  • Runs make check successfully.
  • Retains code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

@slyon slyon added community This PR has been proposed by somebody outside of the Netplan team and roadmap commitments. documentation Documentation improvements. labels Sep 25, 2024
@rkratky
Copy link
Contributor

rkratky commented Sep 25, 2024

@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.
@davidekete
Copy link
Contributor Author

@davidekete, thanks for submitting this! To fix the spellcheck and one cross-doc link, I submitted a PR against your branch: davidekete#3

Thank you. I just merged the PR.

@rkratky
Copy link
Contributor

rkratky commented Sep 25, 2024

Two notes:

  • @davidekete, as discussed on Matrix, could you please rename the main/landing files in the individual categories to index.md? This naming convention is used in all other Ubuntu docs published on RTD, so it'd be good to keep it consistent. Also, it'd avoid the duplication that results from Sphinx building the landing page in two places when the index file is absent.
  • @slyon, while this change in directory structure is certainly an improvement for the repo, it'll mean some existing URLs would no longer work. Therefore, we need redirects. My question is: do you think it would be enough to add redirects for the main categories only (i.e. explanation, howto, ...), or do we need redirects for all existing pages?

@slyon
Copy link
Collaborator

slyon commented Sep 25, 2024

  • do we need redirects for all existing pages?

I think the most important one would be the netplan-yaml reference. Maybe that in combination with the main categories. And also making sure that our website still points to the correct reference, e.g.: https://netplan.io/reference

@slyon slyon self-requested a review September 25, 2024 14:24
@davidekete
Copy link
Contributor Author

Two notes:

  • @davidekete, as discussed on Matrix, could you please rename the main/landing files in the individual categories to index.md? This naming convention is used in all other Ubuntu docs published on RTD, so it'd be good to keep it consistent. Also, it'd avoid the duplication that results from Sphinx building the landing page in two places when the index file is absent.
  • @slyon, while this change in directory structure is certainly an improvement for the repo, it'll mean some existing URLs would no longer work. Therefore, we need redirects. My question is: do you think it would be enough to add redirects for the main categories only (i.e. explanation, howto, ...), or do we need redirects for all existing pages?

@rkratky, I have renamed them as index.md and updated the references to match the names.

@rkratky
Copy link
Contributor

rkratky commented Oct 4, 2024

@slyon, I believe this is good to be merged. Could you please have a look?

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

doc/conf.py Outdated
@@ -121,7 +121,7 @@

redirects = {
'README.md': '/',
'netplan': '/netplan-yaml',
'netplan': '/reference/netplan-yaml',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you say you're missing a redirect for the old netplan-yaml, what do you mean @slyon?

doc/howto/multi-nic-vm-host-with-bonds-and-vlans.md Outdated Show resolved Hide resolved
doc/howto/single-nic-vm-host-with-vlans.md Outdated Show resolved Hide resolved
doc/howto/single-nic-vm-host.md Outdated Show resolved Hide resolved
doc/howto/netplan-everywhere.md Outdated Show resolved Hide resolved
@rkratky
Copy link
Contributor

rkratky commented Oct 10, 2024

In general this looks fine, but it also breaks lots of references around the internet.

Yes, that's my main concern, too.

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 believe the benefits outweigh the negatives (I suggested this change).

@slyon
Copy link
Collaborator

slyon commented Oct 14, 2024

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 netplan-yaml page, then? E.g. https://netplan.io/reference#routing to https://netplan.readthedocs.io/en/latest/reference/netplan-yaml/#routing ?

@rkratky
Copy link
Contributor

rkratky commented Oct 15, 2024

Would you be able to assist with the critical redirects

Yes, I hope. Just acknowledging now because I'm not sure if I'll get to it this week, i.e. before the Sprints.

@davidekete
Copy link
Contributor Author

Would you be able to assist with the critical redirects

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.

@slyon
Copy link
Collaborator

slyon commented Oct 16, 2024

Would you be able to assist with the critical redirects

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 doc/netplan-yaml.md by now (sorry for taking so long), which needs to be resolved.

@davidekete
Copy link
Contributor Author

Would you be able to assist with the critical redirects

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 doc/netplan-yaml.md by now (sorry for taking so long), which needs to be resolved.

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?

Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

doc/reference/netplan-yaml.md Show resolved Hide resolved
@rkratky
Copy link
Contributor

rkratky commented Oct 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community This PR has been proposed by somebody outside of the Netplan team and roadmap commitments. documentation Documentation improvements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants