ropensci-review-tools / babelquarto

Renders a Multilingual Quarto Project (Book or Website)
https://docs.ropensci.org/babelquarto/
Other
40 stars 7 forks source link

Recurse fix #59

Closed Nenuial closed 3 months ago

Nenuial commented 3 months ago

Based on the discussion in #58, here's my PR with just the recurse part. This fixes all my problems with listings and doesn't copy files from other languages if they aren't present.

I've also made a change that avoids adding a translation link to a non existing page (creating 404s when a page only exists in one language).

Nenuial commented 3 months ago

I'll have a look at it later today. I'm quite unfamiliar with tests, but I'm up for the challenge.

maelle commented 3 months ago

No hurry! And I'm happy to answer questions. :smile_cat:

maelle commented 3 months ago

Regarding the basics of tests I recommend reading the three chapters on testing in https://r-pkgs.org/testing-basics.html (but then you might have meant you were not familiar with babelquarto tests, and I won't pretend they 100% follow best practice :sweat_smile: )

Nenuial commented 3 months ago

I've added two tests. The first one checks if a listing only includes the one page it should have. The second tests looks at the files that exist (or shouldn't exist) depending on the languages that exist for a given file.

Nenuial commented 3 months ago

Thank you for your guidance!