quarto-dev / quarto-cli

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

Listing qmd generates recursive directories #6384

Closed CarwilB closed 10 months ago

CarwilB commented 1 year ago

Bug description

Rendering a listing qmd files results in perpetually nested directory creation to store the listed files.

Screenshot 2023-07-31 at 8 31 59 AM

Steps to reproduce

---
title: Dashboards
listing: 
  - id: domain-dashboards
    contents: "ultimate-consequences/domains/Report_*.html"
    type: table
  - id: municipality-dashboards
    contents: "ultimate-consequences/municipalities/Dashboard_*.html"
    type: table
---

## Domains

:::{#domain-dashboards}
:::

## Municipalities

:::{#municipality-dashboards}
:::
---

Expected behavior

Rendering should store the listed files in docs/ultimate-consequences.

Actual behavior

Render stores listed files first in docs/ultimate-consequences/, then in docs/docs/ultimate-consequences/ then in docs/docs/docs/ultimate-consequences, etc.

AS2GM7K2K5:quarto-website bjorkjcr$ rm -R docs/docs
AS2GM7K2K5:quarto-website bjorkjcr$ ls -R docs/docs
ls: docs/docs: No such file or directory
AS2GM7K2K5:quarto-website bjorkjcr$ quarto render dashboards.qmd
pandoc 
  to: html
  output-file: dashboards.html
  standalone: true
  title-prefix: Ultimate Consequences
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  toc: true

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  theme:
    light:
      - cosmo
      - theme.scss
    dark:
      - cosmo
      - theme-dark.scss
  code-copy: true
  title: Dashboards
  listing:
    - id: domain-dashboards
      contents: ultimate-consequences/domains/Report_*.html
      type: table
    - id: municipality-dashboards
      contents: ultimate-consequences/municipalities/Dashboard_*.html
      type: table

Output created: docs/dashboards.html

AS2GM7K2K5:quarto-website bjorkjcr$ ls -R docs/docs
ultimate-consequences

docs/docs/ultimate-consequences:
domains         municipalities

docs/docs/ultimate-consequences/domains:
Report_Coca_2023-04-16.html                     Report_Ethno-ecological_2023-04-16.html         Report_Municipal governance_2023-04-16.html
Report_Contraband_2023-04-16.html               Report_Gas Wars_2023-04-16.html                 Report_Paramilitary_2023-04-16.html
Report_Disabled_2023-04-16.html                 Report_Guerrilla_2023-04-16.html                Report_Partisan Politics_2023-04-16.html
Report_Drug trade_2023-04-16.html               Report_Labor_2023-04-16.html                    Report_Peasant_2023-04-16.html
Report_Economic policies_2023-04-16.html        Report_Local development_2023-04-16.html        Report_Rural Land_2023-04-16.html
Report_Education_2023-04-16.html                Report_Mining_2023-04-16.html                   Report_Urban land_2023-04-16.html

docs/docs/ultimate-consequences/municipalities:
Dashboard_Achacachi.html                Dashboard_La-Paz.html                   Dashboard_Shinahota.html
Dashboard_Challapata.html               Dashboard_Oruro.html                    Dashboard_Sipe-Sipe.html
Dashboard_Chayanta.html                 Dashboard_Porvenir.html                 Dashboard_Unknown-Municipality.html
Dashboard_Chimore.html                  Dashboard_Potosi.html                   Dashboard_Villa-Tunari.html
Dashboard_Cochabamba.html               Dashboard_Puerto-Villarroel.html        Dashboard_Yacuiba.html
Dashboard_El-Alto.html                  Dashboard_Sacaba.html                   Dashboard_Yapacani.html
Dashboard_Huanuni.html                  Dashboard_Santa-Cruz-De-La-Sierra.html
AS2GM7K2K5:quarto-website bjorkjcr$ quarto render dashboards.qmd
pandoc 
  to: html
  output-file: dashboards.html
  standalone: true
  title-prefix: Ultimate Consequences
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  toc: true

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  theme:
    light:
      - cosmo
      - theme.scss
    dark:
      - cosmo
      - theme-dark.scss
  code-copy: true
  title: Dashboards
  listing:
    - id: domain-dashboards
      contents: ultimate-consequences/domains/Report_*.html
      type: table
    - id: municipality-dashboards
      contents: ultimate-consequences/municipalities/Dashboard_*.html
      type: table

Output created: docs/dashboards.html

AS2GM7K2K5:quarto-website bjorkjcr$ ls -R docs/docs
docs                    ultimate-consequences

docs/docs/docs:
ultimate-consequences

docs/docs/docs/ultimate-consequences:
domains         municipalities

docs/docs/docs/ultimate-consequences/domains:
Report_Coca_2023-04-16.html                     Report_Ethno-ecological_2023-04-16.html         Report_Municipal governance_2023-04-16.html
Report_Contraband_2023-04-16.html               Report_Gas Wars_2023-04-16.html                 Report_Paramilitary_2023-04-16.html
Report_Disabled_2023-04-16.html                 Report_Guerrilla_2023-04-16.html                Report_Partisan Politics_2023-04-16.html
Report_Drug trade_2023-04-16.html               Report_Labor_2023-04-16.html                    Report_Peasant_2023-04-16.html
Report_Economic policies_2023-04-16.html        Report_Local development_2023-04-16.html        Report_Rural Land_2023-04-16.html
Report_Education_2023-04-16.html                Report_Mining_2023-04-16.html                   Report_Urban land_2023-04-16.html

docs/docs/docs/ultimate-consequences/municipalities:
Dashboard_Achacachi.html                Dashboard_La-Paz.html                   Dashboard_Shinahota.html
Dashboard_Challapata.html               Dashboard_Oruro.html                    Dashboard_Sipe-Sipe.html
Dashboard_Chayanta.html                 Dashboard_Porvenir.html                 Dashboard_Unknown-Municipality.html
Dashboard_Chimore.html                  Dashboard_Potosi.html                   Dashboard_Villa-Tunari.html
Dashboard_Cochabamba.html               Dashboard_Puerto-Villarroel.html        Dashboard_Yacuiba.html
Dashboard_El-Alto.html                  Dashboard_Sacaba.html                   Dashboard_Yapacani.html
Dashboard_Huanuni.html                  Dashboard_Santa-Cruz-De-La-Sierra.html

docs/docs/ultimate-consequences:
domains         municipalities

docs/docs/ultimate-consequences/domains:
Report_Coca_2023-04-16.html                     Report_Ethno-ecological_2023-04-16.html         Report_Municipal governance_2023-04-16.html
Report_Contraband_2023-04-16.html               Report_Gas Wars_2023-04-16.html                 Report_Paramilitary_2023-04-16.html
Report_Disabled_2023-04-16.html                 Report_Guerrilla_2023-04-16.html                Report_Partisan Politics_2023-04-16.html
Report_Drug trade_2023-04-16.html               Report_Labor_2023-04-16.html                    Report_Peasant_2023-04-16.html
Report_Economic policies_2023-04-16.html        Report_Local development_2023-04-16.html        Report_Rural Land_2023-04-16.html
Report_Education_2023-04-16.html                Report_Mining_2023-04-16.html                   Report_Urban land_2023-04-16.html

docs/docs/ultimate-consequences/municipalities:
Dashboard_Achacachi.html                Dashboard_La-Paz.html                   Dashboard_Shinahota.html
Dashboard_Challapata.html               Dashboard_Oruro.html                    Dashboard_Sipe-Sipe.html
Dashboard_Chayanta.html                 Dashboard_Porvenir.html                 Dashboard_Unknown-Municipality.html
Dashboard_Chimore.html                  Dashboard_Potosi.html                   Dashboard_Villa-Tunari.html
Dashboard_Cochabamba.html               Dashboard_Puerto-Villarroel.html        Dashboard_Yacuiba.html
Dashboard_El-Alto.html                  Dashboard_Sacaba.html                   Dashboard_Yapacani.html
Dashboard_Huanuni.html                  Dashboard_Santa-Cruz-De-La-Sierra.html

Your environment

Quarto check output

[✓] 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.433 Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK Version: 3.9.6 Path: /Library/Developer/CommandLineTools/usr/bin/python3 Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK Version: 4.2.2 Path: /Library/Frameworks/R.framework/Resources LibPaths:

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

cscheid commented 1 year ago

I think the problem here is that you're using the docs/ directory to both store "content" (the files you want to include) and "generated content" (the files rendered by quarto). I think this is not a structure we support. We should do a better job at reporting errors here, but I think your problem might go away if you store "content" elsewhere.

CarwilB commented 1 year ago

@cscheid — Your description would be a case where I would expect recursion, but…

Nonetheless,

This doesn't feel like a case of putting the content inside the generated content.

cscheid commented 1 year ago

Can you share a github repository for us to take a look at?

CarwilB commented 1 year ago

@cscheid Just invited you as a collaborator on CarwilB/quarto-website.

CarwilB commented 1 year ago

Also, I played around with file location just now.

The following subtle shift "solves" the recursion, but it seems like neither should cause it.

It would be nice to either document this requirement for listings pages, or avoid the recursion altogether.

cscheid commented 1 year ago

@cscheid Just invited you as a collaborator on CarwilB/quarto-website.

Thanks. Unfortunately, I'm having trouble building your project. After installing all of the requirements, I get:

30/44 [chart-year-state-responsibility]

Quitting from lines 449-490 [chart-year-state-responsibility] (BSJ-Political-Violence.Rmd)
Error in `grid.Call()`:
! polygon edge not found
Backtrace:
  1. global .main()
 52. grid (local) `<fn>`(`<text>`)
 54. grid:::widthDetails.text(x)
 55. grid:::grid.Call(...)
Execution halted

Without a simpler version of this issue, it'll be hard to track down exactly what's going wrong. I'll be happy to take a look at a slightly more trimmed-down version of your repo; sorry about that!

dragonstyle commented 10 months ago

I'm going to close this out as not-reproducible. If you have time to come back and help us figure out how to narrow this down, please do feel free to re-open the issue.