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

Fetaure Request: Add the possibility to pass the language to get_section #2359

Open
ogarcia opened this issue Nov 20, 2023 · 2 comments
Open

Comments

@ogarcia
Copy link

ogarcia commented Nov 20, 2023

For example, right now to get a section you call get_section(path="blog/_index.md") but that brings up the section with the default language. It would be very interesting if you could do get_section(path="blog/_index.md", lang=lang).

I've been looking for ways to get around this but I can't think of any other. Because adding the language in a way similar to this will fail with the default language that has no code:

get_section(path=["blog/_index", lang, "md" | join(sep=".")])
@SumDonkuS
Copy link
Contributor

SumDonkuS commented Jan 10, 2024

If this is of interest, I think I can put something together for the optional lang argument. Looks like there was some conversation over here, but not sure if it was ever decided upon.

@Keats
Copy link
Collaborator

Keats commented Jan 10, 2024

You can do a PR, I don't think this is controversial

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

No branches or pull requests

3 participants