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

Add cutoff Parameter #11

Open
jalendport opened this issue Nov 5, 2018 · 0 comments
Open

Add cutoff Parameter #11

jalendport opened this issue Nov 5, 2018 · 0 comments

Comments

@jalendport
Copy link

We should add the cutoff parameter found in the original version of Hacksaw back in (both for legacy reasons and also because it might prove useful in some cases).

Another way to limit content is by a cutoff string. This is similar to the way WordPress's "more" feature works. In your content you could add a specific string to indicate the spot you want the excerpt to stop. Let's say you want to use <!-- END --> to cut the excerpt off at that location; you would do this:

{{ entry.richTextField | hacksaw (cutoff='<!-- END -->') }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant