justint / papaya

A clean Zola theme for blogging and projects.
https://justintennant.me/papaya/
MIT License
45 stars 24 forks source link

Removing additional languages #12

Closed 19mk19 closed 1 year ago

19mk19 commented 1 year ago

Hi! Noob here, was attracted by how well-thought out and well-designed the theme is! (disclaimer to let you know this may be totally a me issue)

You mention in the guide that the theme supports additional languages. I was wondering if there is a clean way to remove this ability? When I try to remove language related lines in config.toml or in any other place, the site refuses to build, missing various language related items in multiple places.

Edited - Thanks Justin, it works! Wanted to follow your lead and not mark it closed, so didn't comment on your reply (close with comment).

justint commented 1 year ago

Hey there, glad you like the look of the theme!

If you're looking to have just one language in use you can just remove the [languages.XX] and [languages.XX.translations] for the languages you don't want and set the default_language to your desired one language.

So if you wanted just English for example, you can remove the [languages.zh] and [languages.zh.translations] and everything should just work as normal. You can check out my website's config.toml as an example.

I think this will change a bit once https://github.com/getzola/zola/issues/1918 is complete; I will likely need to update papaya's config to line up with how the defaults should be. I'll keep this issue open so I can address that when the changes drop.