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

Simplify API by only providing multiple formats #42

Open
webketje opened this issue Dec 8, 2021 · 1 comment
Open

Simplify API by only providing multiple formats #42

webketje opened this issue Dec 8, 2021 · 1 comment

Comments

@webketje
Copy link
Member

webketje commented Dec 8, 2021

Would normalize the excerpt file property to always be { html: '...', text: '...' }

Pro's:

  • no need for a multipleFormats option (=simpler API)
  • could add support for a third format: stripped, removing only the outer <p> tags

Cons:

  • not backwards-compatible
  • can't just put {{ excerpt }} in a template
@webketje webketje changed the title [BREAKING] Simplify API by only providing multiple formats Simplify API by only providing multiple formats Dec 13, 2021
@webketje
Copy link
Member Author

Actually this is mostly backwards-compatible, if the object is a new String or has a toString method that returns the html snippet

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

1 participant