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

Pass env to slugify #125

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Conversation

Kaciras
Copy link
Contributor

@Kaciras Kaciras commented Feb 22, 2023

Make it possible to prefix slugs differently in each render

@shynome
Copy link

shynome commented May 18, 2024

want this too

@valeriangalliat
Copy link
Owner

I was thinking of passing the whole state param instead so this gives access to not only env but any other thing interesting in there... not sure if that makes sense

What do you use from state.env that you want to access from the slugify function?

@shynome
Copy link

shynome commented May 18, 2024

want add prefix post.id

@valeriangalliat
Copy link
Owner

valeriangalliat commented Aug 24, 2024

Cool, sorry for the delay - I just refactored this to pass the whole state instead of just env, so you can do state.env, and I put it in an alternative option slugifyWithState to avoid a possible breaking change with slugify

It's live with 9.1.0!

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.

3 participants