ropensci-review-tools / babelquarto

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

test what happens with a Quarto blog #20

Open maelle opened 1 year ago

maelle commented 1 year ago

@joelnitta I haven't tested this setup at all :cold_sweat:

joelnitta commented 1 year ago

I am starting to use it.

One thing I've encountered so far is that you need to select which posts to show in which language. If you have them all under ./posts and your blog.qmd has something like this

listing:
  contents: posts

it will show all posts in both languages.

One solution that is working well for me is to always include a lang field in the frontmatter of each post (you are probably doing this anyways), then specify posts to show by language. For example, blog.ja.qmd has something like this:

listing:
  contents: posts
  include:
    lang: ja
maelle commented 1 year ago

right, in the end I wonder if having the Quarto blog/website files all in the same folder is smart. :thinking: It was a challenge for the rendering too.

But maybe we can keep it as it is now, and document the catch about listings?

joelnitta commented 1 year ago

That sounds fine to me.

I can think of at least two alternatives:

  1. Put the blog posts for each language in a separate subfolder. But I assume that would mess up your system for switching between languages in the rendered website.
  2. Use different branches for each language. This again would require a complete overhaul of how you switch between languages in the rendered website, and would be tricky to maintain.
maelle commented 1 year ago

How nice would it be if Quarto were like Hugo: one post and its translations in one folder :thinking: It's cleaner and the translation is really close to the original.

Your second solution strikes me as something reserved for people who really like juggling with Git branches (not me :joy: ).

beatrizmilz commented 10 months ago

Hi @maelle and @joelnitta !

I created my blog with quarto in the first semester of 2022. Back then, project profiles was not created.

But with time, it got confusing to users... mixed content with English, Portuguese, and Spanish.

https://github.com/beatrizmilz/blog-en

I want to port my blog to Babelquarto and see if can be more user-friendly. I'm doing it in another repo: https://github.com/beatrizmilz/blog-babel

Temporary link: https://beatrizmilz.github.io/blog-babel/

I'll be back as soon I have news!

joelnitta commented 10 months ago

Thanks for the info @beatrizmilz!

I did not know about profiles... seems like it could be a good way to handle translations. What do you think @maelle ?

FYI my (bilingual) website is at https://www.joelnitta.com, with source code at https://github.com/joelnitta/joelnitta-home. I've been using the approach mentioned above for the blog section, seems fine so far.

beatrizmilz commented 10 months ago

Thanks for the info @beatrizmilz!

I did not know about profiles... seems like it could be a good way to handle translations. What do you think @maelle ?

FYI my (bilingual) website is at https://www.joelnitta.com, with source code at https://github.com/joelnitta/joelnitta-home. I've been using the approach mentioned above for the blog section, seems fine so far.

me and my husband made the webpage of our wedding using profiles ( https://beaeju.com.br/ )

code in here: https://github.com/jtrecenti/beaeju.com.br

But we did not use it for blogging. It does not have the feature to click on a post and see the version in another language of the same post, it just returns to the index of the chosen language!

maelle commented 10 months ago

Thanks so much @beatrizmilz! And what a beautiful wedding website, congrats!

Project profiles look like a nice idea :eyes:

maelle commented 2 months ago

I'm thinking about profiles again. For instance it'd be neat to be able to have a different banner per language version: https://quarto.org/docs/blog/posts/2024-07-11-1.5-release/#website-announcements