Skip to content

Instantly share code, notes, and snippets.

@sausman
Last active December 18, 2015 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sausman/5745703 to your computer and use it in GitHub Desktop.
Save sausman/5745703 to your computer and use it in GitHub Desktop.
Example WhipUps Handlebars data by action name.
{
"action": "archive",
"archive": {
"utc": "2013-06-01 00:00:00 UTC",
"timestamp": 1370044800,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"permalink": "\/2013\/06"
},
"posts": [
{
"author": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"title": "An Example Post",
"slug": "an-example-post",
"link": null,
"body": "<p>This is the body of an example blog post.<\/p>\n",
"permalink": "\/2013\/06\/an-example-post",
"published": {
"utc": "2013-06-09 23:18:58 UTC",
"timestamp": 1370819938,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"day": 9,
"day_padded": "09",
"day_name": "Sunday",
"day_name_abbr": "Sun"
}
},
{
"author": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"title": "An Example Linked Post",
"slug": "an-example-linked-post",
"link": "http:\/\/www.example.com\/path\/to\/content.html",
"body": "<p>This is the body of an example linked blog post.<\/p>\n",
"permalink": "\/2013\/06\/an-example-linked-post",
"published": {
"utc": "2013-06-09 23:18:53 UTC",
"timestamp": 1370819933,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"day": 9,
"day_padded": "09",
"day_name": "Sunday",
"day_name_abbr": "Sun"
}
}
],
"title": "June 2013",
"owner": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"avatar": "<img src='http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png'>",
"avatar_url": "http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png",
"name": "Example Blog",
"subdomain": "example-blog",
"domain": "blog.example.com",
"script": "<script type='text\/javascript' src='http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js'><\/script>",
"script_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js",
"style": "<link href='http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css' media='all' rel='stylesheet' type='text\/css'>",
"style_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css"
}
{
"action": "index",
"index": true,
"posts": [
{
"author": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"title": "An Example Post",
"slug": "an-example-post",
"link": null,
"body": "<p>This is the body of an example blog post.<\/p>\n",
"permalink": "\/2013\/06\/an-example-post",
"published": {
"utc": "2013-06-09 23:18:58 UTC",
"timestamp": 1370819938,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"day": 9,
"day_padded": "09",
"day_name": "Sunday",
"day_name_abbr": "Sun"
}
},
{
"author": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"title": "An Example Linked Post",
"slug": "an-example-linked-post",
"link": "http:\/\/www.example.com\/path\/to\/content.html",
"body": "<p>This is the body of an example linked blog post.<\/p>\n",
"permalink": "\/2013\/06\/an-example-linked-post",
"published": {
"utc": "2013-06-09 23:18:53 UTC",
"timestamp": 1370819933,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"day": 9,
"day_padded": "09",
"day_name": "Sunday",
"day_name_abbr": "Sun"
}
}
],
"archives": [
{
"utc": "2013-06-01 00:00:00 UTC",
"timestamp": 1370044800,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"permalink": "\/2013\/06"
}
],
"owner": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"avatar": "<img src='http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png'>",
"avatar_url": "http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png",
"name": "Example Blog",
"subdomain": "example-blog",
"domain": "blog.example.com",
"script": "<script type='text\/javascript' src='http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js'><\/script>",
"script_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js",
"style": "<link href='http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css' media='all' rel='stylesheet' type='text\/css'>",
"style_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css"
}
{
"action": "page",
"page": {
"title": "About",
"slug": "about",
"body": "<p>This is the About page&rsquo;s body content.<\/p>\n",
"permalink": "\/about"
},
"title": "About",
"owner": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"avatar": "<img src='http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png'>",
"avatar_url": "http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png",
"name": "Example Blog",
"subdomain": "example-blog",
"domain": "blog.example.com",
"script": "<script type='text\/javascript' src='http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js'><\/script>",
"script_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js",
"style": "<link href='http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css' media='all' rel='stylesheet' type='text\/css'>",
"style_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css"
}
{
"action": "post",
"post": {
"author": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"title": "An Example Linked Post",
"slug": "an-example-linked-post",
"link": "http:\/\/www.example.com\/path\/to\/content.html",
"body": "<p>This is the body of an example linked blog post.<\/p>\n",
"permalink": "\/2013\/06\/an-example-linked-post",
"published": {
"utc": "2013-06-09 23:18:53 UTC",
"timestamp": 1370819933,
"year": 2013,
"month": 6,
"month_padded": "06",
"month_name": "June",
"month_name_abbr": "Jun",
"day": 9,
"day_padded": "09",
"day_name": "Sunday",
"day_name_abbr": "Sun"
}
},
"title": "An Example Linked Post",
"owner": {
"id": 1,
"name": "Stephen Ausman",
"first_name": "Stephen",
"last_name": "Ausman",
"email": "stephen.ausman@example.com",
"gravatar": "<img src='http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934'>",
"gravatar_url": "http:\/\/www.gravatar.com\/avatar\/25c5b14e77319f4fe44a90568ce21934"
},
"avatar": "<img src='http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png'>",
"avatar_url": "http:\/\/cdn.whipups.net\/d\/uploads\/84\/example-blog-avatar.png",
"name": "Example Blog",
"subdomain": "example-blog",
"domain": "blog.example.com",
"script": "<script type='text\/javascript' src='http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js'><\/script>",
"script_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/script-5259371bc872f5cce0f7d71831decdc837989900.js",
"style": "<link href='http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css' media='all' rel='stylesheet' type='text\/css'>",
"style_url": "http:\/\/cdn.whipups.net\/d\/assets\/10\/style-1b2ed3bdb9d586836da4b47f1db266fce578dd49.css"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment