Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listing - image: false causes error #8715

Closed
dragonstyle opened this issue Feb 13, 2024 · 0 comments
Closed

listing - image: false causes error #8715

dragonstyle opened this issue Feb 13, 2024 · 0 comments
Assignees
Labels
bug Something isn't working listings
Milestone

Comments

@dragonstyle
Copy link
Collaborator

Using the image: false option has produced the following error for me, under Quarto version 1.4.549

ERROR: TypeError: path.startsWith is not a function

Stack trace:
    at listingItemHref (file:///opt/quarto/bin/quarto.js:89130:37)
    at listItemFromFile (file:///opt/quarto/bin/quarto.js:88951:71)
    at eventLoopTick (ext:core/01_core.js:183:11)
    at async readContents (file:///opt/quarto/bin/quarto.js:88780:34)
    at async readListings (file:///opt/quarto/bin/quarto.js:88416:36)
    at async listingHtmlDependencies (file:///opt/quarto/bin/quarto.js:90080:45)
    at async Object.formatExtras (file:///opt/quarto/bin/quarto.js:90400:45)
    at async runPandoc (file:///opt/quarto/bin/quarto.js:68741:63)
    at async renderPandoc (file:///opt/quarto/bin/quarto.js:70041:26)
    at async Object.onRender (file:///opt/quarto/bin/quarto.js:77261:36)

I was able to disable images in the listing by setting image-height: "0" in the listing options.

In addition, once the error is resolved, false doesn't prevent the image from being used as a preview. The below (which is in the default quarto blog project).

---
title: "Welcome To My Blog"
author: "Tristan O'Malley"
date: "2024-02-09"
categories: [news]
image: false
---

This is the first post in a Quarto blog. Welcome!

![](thumbnail.jpg)

Since this post doesn't specify an explicit `image`, the first image in the post will be used in the listing page of posts.

@dragonstyle dragonstyle self-assigned this Feb 13, 2024
@dragonstyle dragonstyle added this to the v1.5 milestone Feb 13, 2024
@mcanouil mcanouil added the bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working listings
Projects
None yet
Development

No branches or pull requests

2 participants