ropensci-review-tools / babelquarto

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

parent_dir is confusing #80

Open joelnitta opened 2 months ago

joelnitta commented 2 months ago

When starting a new project with babelquarto::quarto_multilingual_website() or babelquarto::quarto_multilingual_book(), it is confusing that one has to specify the parent directory of the project. Usually, one's working mode is to be in the project (the project directory is the working directory). So the parent directory is always just ... Why do we need an argument for this?

joelnitta commented 2 months ago

... Also, when I do babelquarto::quarto_multilingual_website(parent_dir = "..", project_dir = "."), the files (_quarto.yml etc) get created in ../, not ./.

Nenuial commented 2 months ago

I believe this stems from a confusion of what babelquarto::quarto_multilingual_website() and babelquarto::quarto_multilingual_book() are there for.

Those two functions should be used to create a folder, not be used inside an existing folder. If you already have a quarto project you should just register the main language and additional languages with register_main_language() and register_further_languages().

I think this will be better explained in the different vignettes in #78

Do you feel there should be a function that allows to start a project from scratch from inside a folder?

maelle commented 1 month ago

@Nenuial should we make the two functions error if the folder exists?

joelnitta commented 1 month ago

Sorry for the delay. I agree now that convert.qmd greatly clears up the confusion. Thanks @Nenuial !

Nenuial commented 1 month ago

@Nenuial should we make the two functions error if the folder exists?

That might be a good idea. I'll run some tests and make a PR.