grantmcdermott / tinyplot

Lightweight extension of the base R graphics system
https://grantmcdermott.com/tinyplot
Apache License 2.0
226 stars 7 forks source link

Website landing (index) page broken #155

Closed grantmcdermott closed 3 months ago

grantmcdermott commented 3 months ago

I just noticed that our website landing (index) page, i.e., README, isn't working properly. Instead, it reverts to NEWS.

@vincentarelbundock @etiennebacher sorry to tag you, but any idea what might be happening? It seems to be downloading the README.md file rather than rendering it...

zeileis commented 3 months ago

I think this might be because of format: gfm in the README.qmd.

grantmcdermott commented 3 months ago

Ah good catch, let me remove and see if that works.

zeileis commented 3 months ago

I think that this has the effect that Quarto produces an index.md page rather than index.html. And then the web server resorts to news.html because index.html is not available.

When you change the README please also change "build" to "built" in the first footnote.

grantmcdermott commented 3 months ago

Fixed, thanks @zeileis!

zeileis commented 3 months ago

I guess that you produce the README.md from the README.qmd and need the gfm format for that. Not sure where you want to put this information now.

But maybe I'm overlooking something here. I'm also struggling with this duplication in other altdoc projects because altdoc wants the qmd while me need the md for CRAN and GitHub.

grantmcdermott commented 3 months ago

I need to be explicit about GFM here, because otherwise my footnotes don’t render properly. But the workaround, it seems, is to leave the YAML empty (as you suggested) and manually run quarto render README.qmd --to gfm.

zeileis commented 3 months ago

Yes, exactly. It would probably good to have this integrated into the workflow somehow...

etiennebacher commented 3 months ago

Couldn't you provide several formats in the header instead? Something like this (not sure the syntax is ok)

format:
  - gfm
  - html

If this doesn't work, could you open an issue in altdoc with some explanations? I can't guarantee I'll address it but maybe @vincentarelbundock could.

vincentarelbundock commented 3 months ago

Calling altdoc::render_docs() locally converts the README.qmd to a Github-friendly README.md file automatically. The problem here is that we rely on Github actions, which work in a branch, so the README.md file in the main branch never gets updated.

So the trick is just to build once locally, commit the new README.md, and then push.