mitodl / ocw-hugo-themes

A Hugo theme for building OCW websites
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

document resources not rendering properly #276

Open pdpinch opened 3 years ago

pdpinch commented 3 years ago

Steps to Reproduce

  1. Add a resource link to a page and choose a document
  2. Add an embedded resource to a page and choose a document

Expected Behavior

Actual Behavior

See: https://ocw-studio-rc.odl.mit.edu/sites/peters-test-2021-09-29-1/type/page/ https://github.mit.edu/ocw-content-rc/pinch-test-2021-09-29-01/blob/main/content/pages/ocw-hugo-themes276.md https://ocw-draft-qa.global.ssl.fastly.net/courses/peters-test-2021-09-29-1/pages/ocw-hugo-themes276/

or:

https://ocw-studio-rc.odl.mit.edu/sites/peters-test-site-2021-11-01/type/page/ https://github.mit.edu/ocw-content-rc/peter-2021-11-01/blob/main/content/pages/link-embed-test.md https://ocw-draft-qa.global.ssl.fastly.net/courses/peters-test-site-2021-11-01/pages/link-embed-test/

ChristopherChudzicki commented 2 years ago

If we allow embedding PDFs, one thing to be careful about is that resourcetype="Document" is not not just PDFs, it's all files with MIME type text OR s3 extension in this list: https://github.com/mitodl/ocw-studio/blob/c17e5cab6fb2410788c14e3ef667ccc3183312bd/gdrive_sync/constants.py#L16

at least for new courses. Unsure what the criteria are for imported courses