Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify locales in "multi locale" mode #651

Merged

Conversation

rickychilcott
Copy link
Contributor

@rickychilcott rickychilcott commented Nov 16, 2022

This is a 🙋 feature or enhancement with a 🔦 documentation change.

Summary

Extending the ability of the "multi locale" mode to specify a limited set of locales instead of outputting all locales (i.e. site.config.available_locales)

@rickychilcott
Copy link
Contributor Author

rickychilcott commented Nov 18, 2022

I tried to get a minimial shim of this into Bridgetown 1.1 and I got stuck because I'm not actually using this via files. Instead we are using the add_resource api from bridgetown-builder... So I'm a bit stuck as to how best to solve my issues without also changing add_resource which doesn't seem right. Any maintainer willing to pair on this one?

@jaredcwhite
Copy link
Member

@rickychilcott Hmm, I don't think the "multi" mode really makes sense for the manual API to generate resources. Just call add_resource for each locale right? (So if you had 10 pages, and 3 locales each, you'd be calling add_resource a total of 30 times)

@rickychilcott
Copy link
Contributor Author

@rickychilcott Hmm, I don't think the "multi" mode really makes sense for the manual API to generate resources. Just call add_resource for each locale right? (So if you had 10 pages, and 3 locales each, you'd be calling add_resource a total of 30 times)

We're doing some weird stuff -- fun but non-standard. But I totally agree after playing with it some more this evening.

@jaredcwhite
Copy link
Member

Thanks again @rickychilcott, this looks great!

@jaredcwhite jaredcwhite merged commit 417a944 into bridgetownrb:main Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants