cockpit-project / cockpit

Cockpit is a web-based graphical interface for servers.
http://www.cockpit-project.org/
GNU Lesser General Public License v2.1
11.2k stars 1.11k forks source link

shell: Take docs from the correct manifest item #21072

Open mvollmer opened 4 weeks ago

mvollmer commented 4 weeks ago

Fixes #21040

mvollmer commented 2 weeks ago

One can argue that "network/firefox" should have its own list of documentation links. We would have to invent something new for our manifests for that, such as a new "docs" top-level section:

{
  "menu": {
    "index":  {
      "docs": [ /* for /network */ ]
   }
 },

 "docs": {
    "firewall": [ /* for /network/firewall */ ],
    "": [ /* for /network */ ],
  }
}

We could also use that instead of { "parent": { "docs": ... } }.

mvollmer commented 1 week ago

One can argue [...]

But whatever the result of that argument is, I think sub-pages should show the docs of their manifest menu entry by default, instead of nothing. So we should have this bug fix in any case.

mvollmer commented 1 week ago

There are not so many doc pages that the menu would become too crowded, and I think "subpage docs only" would need more research to justify the manifest definition change. (That's not a "no", I just don't think it has been done, or is wort ith)

What we want is probably "additional docs for sub-pages". E.g., /network/firewall shows the docs of /network plus firewall specific docs.

But then again, /network might want to show docs that are not applicable to teh firewall (bonds, bridges, ...). So just having separate lists of docs for each sub-page in the manifest seems most flexible. We can manually make them share whatever seems right.