kohactive / blog

koh-v5 blog entries
0 stars 7 forks source link

RFC: Frontmatter for blog posts #1

Closed lrdiv closed 9 years ago

lrdiv commented 9 years ago

middleman-blog gives us a title, date, and tags in new posts generated with middleman article TITLE.

I think we should come up with a new template that includes other data attributes which should be standard across all posts.

Here's what I can think of:

Any feedback?

j-mcnally commented 9 years ago

Seems legit. How do we provide a custom template?

Also a header image for metadata/social embed might be nice.

j-mcnally commented 9 years ago

Author avatar. If u we collect a user email we can use gravatar.

j-mcnally commented 9 years ago

Category, weve often had a category as a single selection in addition to tags.

j-mcnally commented 9 years ago

if we want to be like medium at all we could put, Time to read with an estimate of the length and depth of the article.

lrdiv commented 9 years ago

@j-mcnally Here's what I've got so far...

---
title: <%= @title %>
subtitle:
date: <%= @date.strftime('%F %R %z') %>
tags:
category:
author:
  name:
  email:
  twitter:
  avatar:
time_to_read:
---
j-mcnally commented 9 years ago

is it possible to have configurations locally so when i run the generator it fills in the author info based on ENV vars or something

lrdiv commented 9 years ago

@j-mcnally Good call. Using the middleman-dotenv extension for that. Check out #2

lrdiv commented 9 years ago

Closed in #2