hlxsites / prisma-cloud-docs-website

blocks and gdoc authored content for https://docs.prismacloud.io
Apache License 2.0
3 stars 2 forks source link

Book landing pages #170

Closed iansk closed 11 months ago

iansk commented 11 months ago

We'd like to populate the "book landing pages" with some introductory content. Currently, these pages are loading blank. For example, see:

Let's discuss what options we have to drive these files.

3vil3mpir3 commented 11 months ago

Ideal state:

maxakuru commented 11 months ago

@iansk any docs that exist within the folder map pattern will take precedence over the folder map template, so you can author these landing pages in gdocs as you would any other gdoc content

for example: https://main--prisma-cloud-docs-website--hlxsites.hlx.page/en/enterprise-edition and doc: https://docs.google.com/document/d/1vqUbfX5Ej7AXPryq-_Xw6ojDmsTpCy1G8_efeCW2Px0/edit

it would be helpful to know what should exist on those pages: sidenav, theme switcher, "edit on github" button, etc.. that stuff can be included in the gdoc content using blocks, but may take some extra frontend tweaks

iansk commented 11 months ago

@maxakuru We want all those elements so that the book landing page chrome looks like a standard doc page.

Can we do something like this:

Question: If we include a Gdoc from an Adoc, can we still style the Gdoc using Franklin blocks (i.e. we want to present some interesting experience in the doc page content area)?

maxakuru commented 11 months ago

@iansk so that solution would only fix the pages that have an associated book.yml, not for product pages like https://main--prisma-cloud-docs-website--hlxsites.hlx.page/prisma/prisma-cloud/en/enterprise-edition. It also adds another roundtrip before content is rendered..

I think the best solution is to make those pages authored in gdocs and make some changes to how the article block is rendered. It will be more performant and better for SEO.. and presumably these main book/product pages are the most important for SEO.

I made some changes to support this on a branch: product: https://maxed-gdoc-articles--prisma-cloud-docs-website--hlxsites.hlx.page/en/enterprise-edition (source doc) book: https://maxed-gdoc-articles--prisma-cloud-docs-website--hlxsites.hlx.page/en/enterprise-edition/content-collections (source doc)

let me know your thoughts - note that the sidenav doesn't have any content on the product page, since the metadata sheet doesn't define what books should exist for it. With this setup it's also possible to render pages without the sidenav by removing the template: book in metadata.

iansk commented 11 months ago

@maxakuru This looks great - I was surprised how seamless it worked/looked when I clicked the book page for content collections. Nicely done.

Give me today to play with this, and then I can close this issue. I'd like to play with the product page for Enterprise Edition and see what it looks like without the sidenav, and alternatively try populating the metadata sheet to see what it looks like with books in the sidenav.

iansk commented 11 months ago

For my own future reference:

  1. This is what the page looks like with template:book removed.
enterprise-edition-landing-page-template-book-removed
  1. To add books to the left sidenav, add this entry to the metadata sheet:
/en/enterprise-edition  enterprise-edition  en  English             Enterprise Edition  /docs/en/enterprise-edition/use-cases   /docs/en/enterprise-edition/use-cases;Use Cases;;/docs/en/enterprise-edition/content-collections;Content Collections;;/docs/en/enterprise-edition/policy-reference;Prisma Cloud Application Security Policy Reference;;/docs/en/enterprise-edition/rn;Prisma Cloud Release Notes    Use Cases   50f6a03f40793d69545a4286255f64d3    Enterprise Edition
iansk commented 11 months ago

@maxakuru I've finished looking through how this works. Please finalize and merge.