Skip to content

How to reference / access data resources from a cell #53

@Analect

Description

@Analect

Thanks for your efforts with this tooling.

I was playing around with generating some additional meta-data from a rendered quarto site. Per the resources setting in the _quarto.yml file here, I'm able to ensure my data is available in the rendered docs.

Then, for this *.qmd file, I'm passing through those resources. I'm not sure the second resources under pyodide is strictly necessary.

format: live-html
resources:
  - "../../data/"
pyodide:
  resources:
    - "../../data/"

It's unclear how I should reference that data folder. Is it relative to where my *.qmd file sits relative to the root of the quarto directory. This is why I use ../../data, as my file sits in <root>/docs/demo. This relative location in gh-pages artifacts is the same. I have played around with this, but to no avail. I notice that if I include these resource references, then the rendered document somehow doesn't resolve. If I remove them, it at least resolves, although I'm not able to access the data from a cell.

The other thing of note is that the data folder is empty on the main branch. It only gets populated as part of a pre-render script.

Could you offer some guidance on how I should be doing this correctly? Should the data folder then be accessible within a pyodide cell under some web_user folder? Would be great to get a better understanding of how this works. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions