(Working title)
A base jekyll layout that is designed to pair with gitpub. It aims at supporting various post types through progressive enhancement based on the presence of specific front-matter variables. Here are some guiding design principles.
The following yaml front-matter combinations will result in display differences depending on how post types are classified.
---
date: 2014-10-28 17
---
Post titles are determined by the name
front-matter variable. If this is not set, you get a titless "note".
Notes tend to be relatively short.
---
name: This is an article
date: 2014-10-28 17:34
---
Articles are notes that have the {{ page.name }}
front-matter set. The name is displayed front and center and is geared towards long form. While this diverges from Jekyll convention of using title
as the variable used to name posts (unfortunately), but it is consistent with Microformats 2 h-entry vocab.
The title
variable is strongly coupled with the titleified file name so it can't be checked for existence since it always exists!
---
date: 2014-11-01 13:08
items:
- type: photo
- type: youtube
- type: vimeo
- type: audio
---
Items are entries of the item
front-matter array. The {{ item[*].type }}
determines what the item is and which _include
template to use when inserting them into the page. Items are displayed in order above the post content.
Items can be added to any post type.
---
date: 2014-11-01 13:08
items:
- type: photo
name: Circle Packing
filename: igljSlhv.jpg
src: http://bret.io/base/media/igljSlhv.jpg
---
Adds a photo item above the post content. The alt text is assigned to {{ items[*].name }}
or {{ items[*].filename }}
or nothing if those values are not present. Relative URLs are supported but discouraged. A reliable data store should be used to host the photo, and fully defined URLs used to point to the URL.
TODO: Responsive Images
TODO: Recipe Item
TODO: Event Item
TODO: RSVP Item
TODO: Figure out overlap between items and out-of-post-content band reply context.
TODO: Figure out reposts.
TODO: Youtube Embed item
TODO: Vimeo Embed Item
TODO: Audio Item
TODO: Map Item Embed
TODO: Like Item
TODO: Bookmark/linklog Item
syndication:
- name: Instagram
url: http://instagram.com/p/xxxxx/
- name: Twitter
url: "https://twitter.com/example/status/xxxxx"
The syndication
front-matter array lists off places where the post has been syndicated to. Syndication links are displayed as reply target suggestions as most people do not have their own website.
Syndication can be added to any post type.
client:
id: "http://quill.p3k.io"
name: "Quill"
scope: post
The client
front-matter object contains information about the client used to create the post.
Client can be added to any post type.
geo:
location: "geo:45.524813313,-122.681201062"
place-name: Portland, OR
The geo
front-matter object contains information about the location the post was created at. There is overlap/conflict with the Map item that may require resolution. The geo information displays the place-name
. The location data is looking for use.
Geo can be added to any post type.
tags:
- photo
- geo
- burgers
The tags
front-matter array allows posts to be tagged and displayed in the tag directory page. Posts can have many tags. Tags are a standard jekyll feature. Tags do not affect the permalink of posts.
categories:
- note
- article
- photo
The categories
front-matter array allows posts to be categorized and displayed in the category directory page. Posts can have many category, but this is discouraged as it results in many permanents. Posts should only have a single category. Categories are a standard jekyll feature. Tags affect the permalink of posts and can be assigned to posts by housing additional _post
directories under category folders.
Reply context is meta data that is added to the front-matter to indicate that the post is in reply to another permalink. Can be added to a note. Turning this into an item is a possibility.
TODO: Taylor reply context display for use with Articles.
in-reply-to:
- url: "https://snarfed.org/2013-01-16_atom_feeds_for_facebook_and_twitter"
domain: "snarfed.org"
Displays a simple "In Reply To: {{ in-reply-to[*].url }}
" above the post.
TODO: Use the Jekyll Data store to create a list of queryable contacts based on the {{ in-reply-to[*].domain }}
field in order to display information on people over domains.
TODO: Store reply context data and display reply context above reply notes.
TODO: Handle a deleted yaml object to preserve permalinks and use http equiv to indicate its deleted.
TODO: Figure out how to handle CSS and themes. It would be nice to connect the css to a framework like bootstrap.
Due to the mixed content nature of the item stream, a JS library loader is needed to accommodate the flexibility of what one might want in the post stream. See enhanceEach
.
Can enhanceEach
be accomplished with Browserify?
These libraries are loaded only when an element on the page indicates that they are needed. This is acehived by enhanceEach
.
TODO: Fix appcache. See alistapart on appcache.