Skip to content

Instantly share code, notes, and snippets.

@dyoder
Created October 9, 2013 08:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dyoder/6898322 to your computer and use it in GitHub Desktop.
Save dyoder/6898322 to your computer and use it in GitHub Desktop.
Harp / Jade template for a blog summary page, automatically excepting anything before `<!-- more -->`
- function excerpt(markup) {
- return markup.split("<!-- more -->")[0]
- }
.blog.summary
ul
each post, slug in public.posts.data
li
h3 #{post.title}
p.byline
span.author #{post.author}
span.published #{post.published}
!= excerpt(partial("/posts/" + slug, post))
p
a(href="/posts/" + slug) Read more&hellip;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment