jspaezp / mkquartodocs

Is a mkdocs plugin to make reproducible documentation with quarto
https://jspaezp.github.io/mkquartodocs/
Apache License 2.0
10 stars 1 forks source link

Quarto with ojs? #16

Open dmadisetti opened 8 months ago

dmadisetti commented 8 months ago

Python support looks like it works- but what about other languages like ojs or R?

dmadisetti commented 8 months ago

Actually easy fix:

https://github.com/jspaezp/mkquartodocs/blob/e5c3f825f86645f13f57bc0789f64c4db2f3863b/mkquartodocs/plugin.py#L85

To

 [quarto, "render", str(x), "--to=hugo-md"], check=True
jspaezp commented 5 months ago

Hi there! thanks for pointing this out! I will do some testing and implement that! (sorry for the late reply ... not sure why I didnt see this notification earlier)

dmadisetti commented 5 months ago

** So that was particular to ojs- I didn't try with R

I was thinking about forking this project to integrate with marimo: https://github.com/dmadisetti/quarto-marimo

which I sort of have working with Quarto here: https://github.com/marimo-team/marimo


I think a user provided Quarto command would solve both cases

jspaezp commented 5 months ago

I guess the underlying question is why/how the quarto render using --to=markdown is different from --to=hugo-md ... since all the code execution is handled directly by quarto (and this extension just converts some details to make it compatible with mkdocs).

I think a user provided Quarto command would solve both cases

do you mean like a ... extra_args option to add in the mkdocs.yml? https://github.com/jspaezp/mkquartodocs?tab=readme-ov-file#configuration

dmadisetti commented 5 months ago

I was thinking more like the quarto_path option that already exists. So nevermind, but yes. In my experience using this, hugo-md seems more compatible

jspaezp commented 5 months ago

Wanted to circle back on the state of this .. Long story short ... the change would be larger than I can tackle right now. The rendering using hugo breaks most of the other features I have enabled in this package (attaching screenshots). I can think of re-designing the plugin itself so it supports both flavors of markdown but it entails re-implementing several of the post-processing steps and a dramatic increase in testing (I am not saying no ... I am saying I cannot right now). I am sorry I cannot help you right now with this feature.

Hugo: image

Markdown: image

Regarding R support ... it was also a bit trickier than I expected ... BASICALLY ... pure python qmd's render using jupyter, whilst R+python qmd's render using rmarkdown+reticulate, so I would need to add some extra parameters to make sure the version of python passed to reticulate is the virtual env of interest, not the system python. This one feels a bit less disruptive.

If you drop an OJS example It would be great to have a future reference for future.

Thank you so much for the interest in the project and I will try my best to make time to implement this features!

dmadisetti commented 5 months ago

I have had this working locally with ojs and python for a few months now. I can push what I have- if you are interested, I don't exactly remember what other tweaks I did

But thanks for taking the feedback seriously!

jspaezp commented 5 months ago

Well if you have a PR I would be glad to review and merge it!