quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.96k stars 327 forks source link

card does not render from a listing yml file when the path entry is an ipynb file #9614

Open pantelis opened 6 months ago

pantelis commented 6 months ago

Bug description

When I specify in the listing.yml file a path to a notebook the rendered card is empty. However is the same exact notebook is quoted outside the yml file in the listing: contents: path_to_index.ipynb then the card is rendered correctly.

Steps to reproduce

---
title: The Learning Problem
pagetitle: The Learning Problem
subtitle: Vapnik's foundational learning problem diagram
title-block-banner: true
sidebar: true
search: true
toc: true
listing:
  contents: 
    - ../../aiml-common/lectures/regression/linear-regression/index.ipynb
    - learning-problem.yml
  sort: "default"
  type: grid
  categories: true
  filter-ui: true
  page-size: 30
  feed: true
---

Expected behavior

The card of the notebook linked via the yml file should show up with image and title, author tec.

Actual behavior

Instead the card of the notebook linked via a yml file is blank but the empty card is still clickable and parsable.

Your environment

Quarto check output

Quarto 1.4.554
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.554
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

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

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

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
mcanouil commented 6 months ago

Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? The goal is to make it as easy as possible for us to recreate your problem so that we can fix it: please help us help you! Thanks.

We don't have:

- ../../aiml-common/lectures/regression/linear-regression/index.ipynb
- learning-problem.yml

You can share a self-contained "working" (reproducible) Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````). See https://quarto.org/bug-reports.html#small-is-beautiful-aim-for-a-single-document-with-10-lines.

If you have multiple files (and if it is absolutely required to have multiple files), please share as a Git repository.

RPython
`````md ````qmd --- title: "Reproducible Quarto Document" format: html engine: knitr --- This is a reproducible Quarto document. ```{r} x <- c(1, 2, 3, 4, 5) y <- c(1, 4, 9, 16, 25) plot(x, y) ``` ![An image](https://placehold.co/600x400.png) The end. ```` ````` `````md ````qmd --- title: "Reproducible Quarto Document" format: html engine: jupyter --- This is a reproducible Quarto document. ```{python} import matplotlib.pyplot as plt x = [1, 2, 3, 4, 5] y = [1, 4, 9, 16, 25] plt.plot(x, y) plt.show() ``` ![An image](https://placehold.co/600x400.png) The end. ```` `````

Additionally and if not already given, please share the output of quarto check within a code blocks (i.e., using three backticks ```txt), see https://quarto.org/bug-reports.html#check.

pantelis commented 6 months ago

Thank you - I have zipped a sample github repo of a the basic website project and added the necessary directories to demo the issue. If you click from the topnav the "learning problem" you will be taken to a web page where the md file card is visible but the ipynb card is not. Both md and ipynb files are in the same dir and are part of the same listing.

issue.zip

mcanouil commented 6 months ago

Thanks, but we do need something small and reproducible. For example:

  1. create an empty git repository
  2. quarto create project blog
  3. Complete your example.
github-actions[bot] commented 5 months ago

Thank you for using Quarto and reporting an issue!

Unfortunately, this issue is now considered stale because it has been opened since 14 days without providing a "working" reproducible example to help us investigate. If you are still facing the issue, please review the "Bug Reports" guide on how to provide a fully reproducible example as a self-contained Quarto document or a link to a Git repository. Without a reproducible example, it is unlikely that the issue will be addressed.

You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````).

````qmd
---
title: "Reproducible Quarto Document"
format: html
---

This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.

```{r}
plot(cars)

The end.