quarto-dev / quarto-dev/quarto-cli

OJS inputs hidden in Hugo output?

Open
#2,495 3 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Sep 19, 2022.

bug ojs-engine
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Not tagging this as a bug as I'm not sure if I'm doing something wrong -- would appreciate any help. I'm using Quarto 1.1.251.

Inputs in ObservableJS cells created in Quarto with hugo as the output format, then rendered to html using hugo seem to be hidden. Here is an example qmd:

---
title: Test Quarto + Hugo + OJS
author: Aaron Schiff
date: 2022-09-19T17:12:56+12:00
draft: false
format: html
execute:
    echo: false
    warning: true
---

## Testing OJS input

```{ojs}
viewof test_input = Inputs.select(['A', 'B', 'C'], { label: "Pick one:" });
```

Should be input box above here.

The output after rendering with hugo looks like this:

Screen Shot 2022-09-19 at 17 26 48

The select input exists in the rendered html but has display: none; applied by quarto-ojs.css:

Screen Shot 2022-09-19 at 17 29 07

If I change the output target to html, the select input appears as expected:

Screen Shot 2022-09-19 at 17 33 18

Is this a Quarto issue or have I done something wrong, eg in the yaml?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.