laktek / punch-blog

A boilerplate to create personal blogs based on Punch
MIT License
45 stars 14 forks source link

custom helper for post page #23

Open constantx opened 10 years ago

constantx commented 10 years ago

hi @laktek,

I'm trying to write a custom helper that will return the first paragraph on a individual post page, (to be used in a <meta name="description"). Looking at index_helper.js, I kinda know how to do it, but not sure how to hook it into the individual post content page.

Any hint?


#chargedByZenHub

constantx commented 10 years ago

My attempt with a block helper, though I feel it's a bit clumsy: https://github.com/axiomzen/axioms.io/commit/415fab1f943fc132bcc5b29b76c2036dc910b8ad

Would love your feedback ;)