hlxsites / prisma-cloud-docs-website

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

Spreadsheet ingestion - specifying sheets not supported #215

Closed iansk closed 1 year ago

iansk commented 1 year ago

When embedding a sheet in a table in an adoc file, you can't specify a sheet.

[format=csv, options="header"]
|===
https://main\--prisma-cloud-docs-website\--hlxsites.hlx.live/en/enterprise-edition/assets/apis-ingested-by-prisma-cloud?sheet=oci
|===

For example, see this page on the ian-fix-sheets branch:

https://main--prisma-cloud-docs-website--hlxsites.hlx.page/en/enterprise-edition/content-collections/connect/connect-cloud-accounts/onboard-your-oci-account/oci-apis-ingested-by-prisma-cloud?branch=ian-fix-sheets

Here's the page:

https://main--prisma-cloud-docs-website--hlxsites.hlx.page/en/enterprise-edition/content-collections/connect/connect-cloud-accounts/onboard-your-oci-account/oci-apis-ingested-by-prisma-cloud?branch=ian-fix-sheets

I think it's due to this code in blocks/table/table.js in the function sheetToDivTable, which doesn't extract and pass the sheet param to fetchJSON.

maxakuru commented 1 year ago

@iansk could you add the .json extension?

[format=csv, options="header"]
|===
https://main\--prisma-cloud-docs-website\--hlxsites.hlx.live/en/enterprise-edition/assets/apis-ingested-by-prisma-cloud.json?sheet=oci
|===

edit: nevermind you're right this is a bug