You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate an html output with figures generated by python and specify the name of the output file and directory. When I do this, the html is broken and the image files do not link correctly.
For some background I would like to use quarto parameters with python to generate a series of web pages in a sub-directory for my project, which is a website. I'm trying to use the --output and --output-dir flags on the cli to specify the name of the output file instead of the template .qmd file that I created.
quarto render demo/demo.qmd --output new_demo.html --output-dir _site/
view the output html in _site/new_demo.html in a browser.
If you do a simple quarto render on the entire project, then _site/demo/demo.html views properly in a browser.
I tried a second alternative:
quarto render demo/demo.qmd --output new_demo.html --output-dir _site/new_demo
This version generates an entire new website at _site/new_demo and the resulting _site/new_demo/new_demo.html is also broken.
Expected behavior
I expect to specify the name of an output file and directory for an html page and have the generated figures link correctly to the html page.
Actual behavior
The generated html does not link correctly to the figures and the additional css formatting is missing.
Your environment
editing in emacs, using cli to generate output, chrome to view html output
Quarto check output
Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.57
Path: /opt/quarto/bin
You are breaking the link because you change the structure of the file path without accounting for the "demo" directory.
That's not an approach that is supported (at least for now).
In a scenario, where I would use parameterised website page, I would have _template.qmd leaving "outside" the project and take a pre-render script to render the template into other qmd files which would be integrated in the website.
Or even use include shortcode to have the logic in several documents which could have different default parameters / YAML.
Bug description
I'm trying to generate an html output with figures generated by python and specify the name of the output file and directory. When I do this, the html is broken and the image files do not link correctly.
For some background I would like to use quarto parameters with python to generate a series of web pages in a sub-directory for my project, which is a website. I'm trying to use the
--output
and--output-dir
flags on the cli to specify the name of the output file instead of the template .qmd file that I created.Steps to reproduce
See the following github repo: https://github.com/anielsen001/quarto-output-dir-files
Run this command:
view the output html in
_site/new_demo.html
in a browser.If you do a simple
quarto render
on the entire project, then_site/demo/demo.html
views properly in a browser.I tried a second alternative:
This version generates an entire new website at
_site/new_demo
and the resulting_site/new_demo/new_demo.html
is also broken.Expected behavior
I expect to specify the name of an output file and directory for an html page and have the generated figures link correctly to the html page.
Actual behavior
The generated html does not link correctly to the figures and the additional css formatting is missing.
Your environment
editing in emacs, using cli to generate output, chrome to view html output
Quarto check output
Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.2.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.41.0: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.5.57
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2019
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.12.1
Path: /home/apn/temp/output-name-test/venv/bin/python3
Jupyter: 5.7.2
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........(None)
The text was updated successfully, but these errors were encountered: