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

Add support for images in /man/figures #316

Open
tony-aw opened this issue Feb 25, 2025 · 8 comments
Open

Add support for images in /man/figures #316

tony-aw opened this issue Feb 25, 2025 · 8 comments

Comments

@tony-aw
Copy link

tony-aw commented Feb 25, 2025

Hi

I tried to create a quarto website of a package (I completely removed the vignettes folder for testing purposes).

I get the following error:

── Update HTML ─────────────────────────────────────────────────────────────────────────────
ERROR: Project _quarto.yml validation failed.

In file D:\D Desktop\Publications\R package squarebrackets\squarebrackets\_quarto\_quarto.yml
(line 6, columns 3--13) property name code-links is invalid
5:   title: squarebrackets
6:   code-links: true
    ~~~~~~~~~~~
7:   navbar:
i The error happened in location website:code-links.

quarto and altdoc, as well as their dependencies, are up-to-date. And roxygen2, knitr, devtools, pkgdown, are also all up-to-date.

Kind regards,

Tony

@etiennebacher
Copy link
Owner

Hi, I've never used code-links but from what I can see in the docs they don't accept the value true? Do you have a small example or a link to a repo where this happens?

@tony-aw
Copy link
Author

tony-aw commented Feb 25, 2025

Hi,

I've not published the repo with altdoc yet, because I wanted to try altdoc on my laptop first.
altdoc creates the _quarto.yml file, I didn't create it, and I didn't touch the values that altdoc specifies.
I see it's specified in altdoc here:

Kind regards,

Tony

@etiennebacher
Copy link
Owner

I cannot reproduce on one of my packages that doesn't use altdoc. I used the devel version of altdoc and quarto 1.6.40.

Can you report the versions of altdoc and quarto that you use?

@tony-aw
Copy link
Author

tony-aw commented Feb 25, 2025

altdoc version 0.5.0
quarto version 1.4.4

@etiennebacher
Copy link
Owner

Can you update quarto and see if that works? I mean the CLI tool, not the R package "quarto"

https://quarto.org/docs/get-started/

@tony-aw
Copy link
Author

tony-aw commented Feb 26, 2025

Hi,

Yes! that was the issue. The Quarto program was not up-tp-date.
The website now works without errors. Thanks for the help!

I did notice a different issue: altdoc is not rendering figures from function help pages.
altdoc points figures to the folder /docs/help/figures/, but that folder is never created by altdoc. The figures in the package are stored in /man/figures/ (as is usally the case for R packages.
Did I forget some kind of configuration?

Kind regards,

Tony

@tony-aw
Copy link
Author

tony-aw commented Feb 26, 2025

By the way, simply copy-paste-ing the images from _quarto\man\figures to docs\help\figures fixes the issue of missing images.
I could write a simple R script to do it for me everytime I update the website.
But it might be more user-friendly if altdoc does this as part of the render_docs() function.

@etiennebacher
Copy link
Owner

etiennebacher commented Feb 26, 2025

But it might be more user-friendly if altdoc does this as part of the render_docs() function.

I agree but I can't promise I'll work on this anytime soon. It might be better to use a custom script for this for now.

Just for future me, I think this is the same as #7

@etiennebacher etiennebacher changed the title property name code-links is invalid Add support for images in /man/figures Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants