quarto-dev / quarto-dev/quarto-cli

Linking from `revealjs` slides to a plain `html`-format page yields plaintext instead of rendered output in browser

Open
#5,106 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Bug description

When linking from a slide deck to a plain HTML-format page using a link like [link](/index.qmd) displays as plaintext QMD in the browser. I expected this to display as properly-rendered HTML. Changing the link to [link](/index.html) resolves the issue, but break's Quarto's ability to detect broken internal links (e.g. no warnings are thrown if I link to a non-existent file [link](/foo.html))

Reproducing from repo

Reproduction repository: https://github.com/MattF-NSIDC/sscce-quarto-slides-link-to-html-issue

Clone the repo, run quarto preview (or render), and click the link in the slide deck. Your browser URL bar should show .../index.qmd instead of .../index.html and the content displayed should be plaintext. Expected this to be properly rendered HTML.

Reproducing from scratch
  1. Create the project
quarto create-project --type=website
  1. Create a slides directory with _metadata.yml which overrides the format of the
    directory's contents to revealjs.
  2. Create a slides/test.qmd which has a link to index.qmd.
  3. Render or preview the site
quarto preview
  1. Navigate to the slide deck in the browser, and click the "Go home" link
  2. Observe the browser shows plaintext instead of expected HTML, and the URL bar says
    /slides/test.qmd instead of the expected slides/test.html.
  3. The issue can be resolved by editing slides/test.qmd to link to /index.html
    instead of /index.qmd. NOTE: This breaks the ability of Quarto to detect broken
    links (e.g. it will be happy with linking /foo.html even though that doesn't exist).
Versions
  • RStudio: None
  • OS: Ubuntu 20.04
  • Quarto: 1.2.335, 1.3.262, 1.3.309
Quarto check
$ quarto check

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.262
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.8.10
      Path: /usr/bin/python3
      Jupyter: 4.6.3
      Kernels: python3

(/) Checking Jupyter engine render..../usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.14) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
  File "/opt/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/opt/quarto/share/jupyter/notebook.py", line 18, in <module>
    from nbclient import NotebookClient
ModuleNotFoundError: No module named 'nbclient'
[✓] Checking Jupyter engine render....OK
Checklist
  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.

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.

Research direction

Start with the linked reproduction repository and run quarto preview or render it, then inspect how the slide link is resolved. Done means links to .qmd pages open rendered HTML while Quarto still warns about nonexistent internal targets such as /foo.html.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.