Closed grantmcdermott closed 5 months ago
altdoc
uses the file altdoc/docsify.md
for the website. Currently the functions indexed on the website are hardcoded there:
...
* Functions:
- [`plot2`](man/plot2.md)
- [`draw_legend`](man/draw_legend.md)
...
You have two choices: either add more functions by hand (allows you to control the order, similar to pkgdown
workflow), or use * Functions: $ALTDOC_MAN_BLOCK
. In the latter case, altdoc
will automatically populate the "Functions" section (but you lose flexibility).
Ah, got it thanks Etienne. I'm wondering if I'm running up against some of the limitations of docsify here. Speaking of which... two questions while I have you:
Can I adjust the width of the figures on the rendered website? They look especially cramped on mobile. I'm happy to write the SCSS if you can just point me to where it belongs.
I do plan to get around to building a gallery, as per #59. I envisage a nested structure with sub-pages like "scatter plots", "distribution plots", etc. giving a variety of examples. Do you have thoughts on which of altdoc
s various backends would make this easiest (maybe a quarto website)?
altdoc
since all files there are copied to the docs
folder. You can then add a link to those stylesheets in altdoc/docsify.html
.mkdocs-material
. It's really good looking and has tons of great options/addins (on a sidenote that would also allow us to check that the workflow for mkdocs
works well, for now it's only tested on polars
). In mkdocs
you can have several tabs (e.g "Articles", "Reference" on r-polars website), and then in each tab you can put a list of plots. There are a lot of config possible with it. I'm almost certain @vincentarelbundock would push for a quarto website though 😄 Super, thanks. Let me give this some thought and also hear what Vincent has to say.
I'm almost certain @vincentarelbundock would push for a quarto website though 😄
Not really, no. The reason I use Quarto for marginaleffects
is that I need the "tabset" feature and I couldn't get it to work in MkDocs. The reason I use Quarto for modelsummary
is that its functions generate a bunch of raw HTML, and it is not as smooth with Markdown-based websites.
But Grant doesn't want mkdocs, because of Python environment issues. And Docute is no longer maintained. So I think it's between docsify and quarto.
FWIW, I created a gallery with the Lightbox extension for Quarto, and it was super easy:
https://github.com/vincentarelbundock/marginaleffects/blob/main/vignettes/meme.qmd
It is rendered (and is an exported function)... but isn't listed among the
Functions:
menu items on the left. https://grantmcdermott.com/plot2/#/man/par2Do I need to manually add it to the
altdoc
YAML somewhere?cc @etiennebacher