quarto-dev / quarto-dev/quarto-cli
Linking from `revealjs` slides to a plain `html`-format page yields plaintext instead of rendered output in browser
Nobody has claimed this yet.
- 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
- Create the project
quarto create-project --type=website
- Create a slides directory with
_metadata.ymlwhich overrides the format of the
directory's contents torevealjs. - Create a
slides/test.qmdwhich has a link toindex.qmd. - Render or preview the site
quarto preview
- Navigate to the slide deck in the browser, and click the "Go home" link
- Observe the browser shows plaintext instead of expected HTML, and the URL bar says
/slides/test.qmdinstead of the expectedslides/test.html. - The issue can be resolved by editing
slides/test.qmdto 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.htmleven 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 checkso we know which version of quarto and its dependencies you're running.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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