Reputation: 177
I have a metafile that contains text like:
[Title]
body text
I want to use filter to show only text between the brackets as title and the same metefied for body text only, please help~
{{ details | filters }}
Upvotes: 1
Views: 321
Reputation: 177
I find this solution but I don't know if it's the best one
To show only text between brackets []
{{ details_01 | remove: '['| split: "]" | slice: 0, 1 }}
To show the body text.
{{ details_01 | remove: '['| split: "]" | slice: 1, 1 }}
Upvotes: 1