Closed iansk closed 1 year ago
@iansk the format the docs.paloalto link is slightly different than what we can do with the data, without adding specific handling for this case. could you check this out and see what you think: https://github.com/hlxsites/prisma-cloud-docs-website/pull/93
@maxakuru https://github.com/hlxsites/prisma-cloud-docs-website/pull/93 looks good. Just a couple of comments:
Comment 1:
There seems to be a regression, which was fixed in https://github.com/hlxsites/prisma-cloud-docs-website/issues/40. Essentially, the first topic in a section is what should be loaded when you click on the section entry in the nav.
For example, the Public Section book.yml has this entry:
- name: 22.01.840
dir: v22_01_840
topics:
- name: v22_01_840
file: v22_01_840.adoc
- name: Scan results
file: scan_results_22_01_840.adoc
- name: Console vulnerabilities
file: console_vulnerabilities.adoc
- name: Defender vulnerabilities
file: defender_vulnerabilities.adoc
The v22_01_840.adoc
file should be loaded/rendered when you click on 22.01.840 in the left nav. It shouldn't be listed as a separate topic. See the following screenshot:
Comment 2:
I just noticed we've got a corner case in our book.yml
, and I'm not sure if your code covers it. Essentially, our book.yml
defines a section that's only contains on topic. We should treat it the same as above, i.e. render an entry in the ToC named 22.12.415. When you click on it, it loads/renders V22_12_415.adoc
. Ideally, for these "one topic sections", you'd hide the chevron.
- name: 22.12.415
dir: v22_12_415
topics:
- name: Scan results
file: V22_12_415.adoc
@iansk right now the logic is to render all topics under a chapter (or parent topic) as a child, except for if the name
of both the parent and child are identical.. in those cases we hide the child and only use the parent as the link
for 1: we could add checks for any permutation of file/name/dir matching, but that's 4 ways to reach that state instead of 1 and may lead to cases that aren't intended to be hidden. imo just renaming name: v22_01_840
to match name: 22.01.840
would be doing same with less
for 2: we can add the same hiding logic for "one child sections".. I don't see any cases where you would want a single child to exist there
@maxakuru
For 1: Totally agree, section name
and the first topic's name
should always be identical. You don't need to do anything else here. It's all working. See:
For 2: What's the logic for handling this now?
I changed the book.yml from this:
- name: 22.12.415
dir: v22_12_415
topics:
- name: Scan results
file: V22_12_415.adoc
To this:
- name: 22.12.415
dir: v22_12_415
topics:
- name: 22.12.415
file: V22_12_415.adoc
Now when you click on the section entry here:
You get redirected here:
Something's not quite working right...
@iansk fixed this in #109 - was just a case of bad links for the parent topic when removing the single child subtopics underneath them
there are now still some semi-duplicated items in the sidenav:
but that's not a bug in the sidenav logic, just more cases where the content in book.yml needs to be updated to match between parent/child.. this is currently case sensitive fyi, which is why the 2nd one is still duplicated
In the Prisma Cloud Compute Edition Public Sector book, the sections under "Release Findings" aren't properly nested:
All version (XX.YY.ZZZ) entries in this section should be at the same level, i.e.
Repro:
Expected results:
For reference, see how the ToC is structured for this section on our current doc site: https://docs.paloaltonetworks.com/prisma/prisma-cloud/prisma-cloud-compute-edition-public-sector/Release_Findings