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

par2 is not indexed on website #102

Closed
grantmcdermott opened this issue Jan 25, 2024 · 5 comments
Closed

par2 is not indexed on website #102

grantmcdermott opened this issue Jan 25, 2024 · 5 comments

Comments

@grantmcdermott
Copy link
Owner

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/par2

Do I need to manually add it to the altdoc YAML somewhere?

cc @etiennebacher

@etiennebacher
Copy link
Contributor

etiennebacher commented Jan 25, 2024

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).

@grantmcdermott
Copy link
Owner Author

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:

  1. 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.

  2. I do plan to get around to building a gallery, as per Make a gallery? #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 altdocs various backends would make this easiest (maybe a quarto website)?

@etiennebacher
Copy link
Contributor

  1. I suppose you can adjust figure width with some (S)CSS. You should store the stylesheets in altdoc since all files there are copied to the docs folder. You can then add a link to those stylesheets in altdoc/docsify.html.
  2. I don't really know which one would be appropriate for a gallery, but I particularly like 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 😄

@grantmcdermott
Copy link
Owner Author

Super, thanks. Let me give this some thought and also hear what Vincent has to say.

@vincentarelbundock
Copy link
Collaborator

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

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

3 participants