This function will require the user that use it to have Quarto available on PATH. Warning: CRAN won't have quarto (in case you plan to publish it to CRAN)
This is what the issue you have is about
Do you really need index.qmd
to be run by the user ? Can't you just share as a HTML file ?
In R package, especially for CRAN, vignettes with rmarkdown engine is still the best way to that. Quarto is not available for vignette on CRAN yet.
Building for a pkgdown website though to be publish as HTML is maybe possible though, as pkgdown process is independant of CRAN