Skip to content

Commit

Permalink
optimised template to use with CloudCannon
Browse files Browse the repository at this point in the history
  • Loading branch information
mneumegen committed Jan 24, 2018
1 parent c12508f commit db9d4be
Show file tree
Hide file tree
Showing 25 changed files with 475 additions and 304 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
source 'https://rubygems.org'

gem 'jekyll', '3.3.1'
gem 'jekyll', '3.6.2'

group :jekyll_plugins do
gem 'jekyll-seo-tag', '2.1.0'
gem 'jekyll-sitemap', '0.12.0'
gem 'jekyll-seo-tag', '2.4.0'
gem 'jekyll-sitemap', '1.1.1'
end
58 changes: 32 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,53 +1,59 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
ffi (1.9.14)
ffi (1.9.18)
forwardable-extended (2.6.0)
jekyll (3.3.1)
jekyll (3.6.2)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.0)
jekyll-sass-converter (1.5.1)
sass (~> 3.4)
jekyll-seo-tag (2.1.0)
jekyll-seo-tag (2.4.0)
jekyll (~> 3.3)
jekyll-sitemap (0.12.0)
jekyll-sitemap (1.1.1)
jekyll (~> 3.3)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.13.0)
liquid (3.0.6)
listen (3.0.8)
jekyll-watch (1.5.1)
listen (~> 3.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
mercenary (0.3.6)
pathutil (0.14.0)
pathutil (0.16.1)
forwardable-extended (~> 2.6)
public_suffix (2.0.4)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rouge (1.11.1)
public_suffix (3.0.1)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby_dep (1.5.0)
safe_yaml (1.0.4)
sass (3.4.22)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
ruby

DEPENDENCIES
jekyll (= 3.3.1)
jekyll-seo-tag (= 2.1.0)
jekyll-sitemap (= 0.12.0)
jekyll (= 3.6.2)
jekyll-seo-tag (= 2.4.0)
jekyll-sitemap (= 1.1.1)

BUNDLED WITH
1.12.5
1.16.0.pre.3
17 changes: 13 additions & 4 deletions _api/_defaults.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
---
title:
title:
position:
type:
description:
right_code:
parameters:
- name:
content:
content_markdown:
left_code_blocks:
- code_block:
title:
language:
right_code_blocks:
- code_block:
title:
language:
---
73 changes: 37 additions & 36 deletions _api/books_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,44 @@ title: /books
position: 1.1
type: post
description: Create Book
right_code: |
~~~ json
{
"id": 3,
"title": "The Book Thief",
"score": 4.3,
"dateAdded": "5/1/2015"
}
~~~
{: title="Response" }
parameters:
- name: title
content: The title for the book
- name: score
content: The book's score between 0 and 5
content_markdown: |-
The book will automatically be added to your reading list
{: .success}
~~~ json
{
"error": true,
"message": "Invalid score"
}
~~~
{: title="Error" }
Adds a book to your collection.
left_code_blocks:
- code_block: |-
$.post("http://api.myapp.com/books/", {
"token": "YOUR_APP_KEY",
"title": "The Book Thief",
"score": 4.3
}, function(data) {
alert(data);
});
title: jQuery
language: javascript
right_code_blocks:
- code_block: |-
{
"id": 3,
"title": "The Book Thief",
"score": 4.3,
"dateAdded": "5/1/2015"
}
title: Response
language: json
- code_block: |-
{
"error": true,
"message": "Invalid score"
}
title: Error
language: json
---
title
: The title for the book

score
: The book's score between 0 and 5

The book will automatically be added to your reading list
{: .success }

Adds a book to your collection.

~~~ javascript
$.post("http://api.myapp.com/books/", {
"token": "YOUR_APP_KEY",
"title": "The Book Thief",
"score": 4.3
}, function(data) {
alert(data);
});
~~~
{: title="jQuery" }
64 changes: 34 additions & 30 deletions _api/books_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,39 @@ title: /books/:id
position: 1.5
type: delete
description: Deletes a book
right_code: |
~~~ json
{
"id": 3,
"status": "deleted"
}
~~~
{: title="Response" }
~~~ json
{
"error": true,
"message": "Book doesn't exist"
}
~~~
{: title="Error" }
parameters:
- name:
content:
content_markdown: |-
Deletes a book in your collection.
left_code_blocks:
- code_block: |-
$.ajax({
"url": "http://api.myapp.com/books/3",
"type": "DELETE",
"data": {
"token": "YOUR_APP_KEY"
},
"success": function(data) {
alert(data);
}
});
title: jQuery
language: javascript
right_code_blocks:
- code_block: |2-
{
"id": 3,
"status": "deleted"
}
title: Response
language: json
- code_block: |2-
{
"error": true,
"message": "Book doesn't exist"
}
title: Error
language: json
---
Deletes a book in your collection.

~~~ javascript
$.ajax({
"url": "http://api.myapp.com/books/3",
"type": "DELETE",
"data": {
"token": "YOUR_APP_KEY"
},
"success": function(data) {
alert(data);
}
});
~~~
{: title="jQuery" }
62 changes: 32 additions & 30 deletions _api/books_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,35 @@ title: /books/:id
position: 1.3
type: get
description: Get Book
right_code: |
~~~ json
{
"id": 3,
"title": "The Book Thief",
"score": 4.3,
"dateAdded": "5/1/2015"
}
~~~
{: title="Response" }
~~~ json
{
"error": true,
"message": "Book doesn't exist"
}
~~~
{: title="Error" }
---

Returns a specific book from your collection

~~~ javascript
$.get("http://api.myapp.com/books/3", {
token: "YOUR_APP_KEY",
}, function(data) {
alert(data);
});
~~~
{: title="jQuery" }
parameters:
- name:
content:
content_markdown: |-
Returns a specific book from your collection
left_code_blocks:
- code_block: |-
$.get("http://api.myapp.com/books/3", {
token: "YOUR_APP_KEY",
}, function(data) {
alert(data);
});
title: jQuery
language: javascript
right_code_blocks:
- code_block: |2-
{
"id": 3,
"title": "The Book Thief",
"score": 4.3,
"dateAdded": "5/1/2015"
}
title: Response
language: json
- code_block: |2-
{
"error": true,
"message": "Book doesn't exist"
}
title: Error
language: json
---
Loading

0 comments on commit db9d4be

Please sign in to comment.