diff --git a/source/includes/_errors.md b/source/includes/_errors.md new file mode 100644 index 0000000..7e545e6 --- /dev/null +++ b/source/includes/_errors.md @@ -0,0 +1,18 @@ +# Errors + +The Kittn API uses the following error codes: + + +Error Code | Meaning +---------- | ------- +400 | Bad Request -- Your request sucks +401 | Unauthorized -- Your API key is wrong +403 | Forbidden -- The kitten requested is hidden for administrators only +404 | Not Found -- The specified kitten could not be found +405 | Method Not Allowed -- You tried to access a kitten with an invalid method +406 | Not Acceptable -- You requested a format that isn't json +410 | Gone -- The kitten requested has been removed from our servers +418 | I'm a teapot +429 | Too Many Requests -- You're requesting too many kittens! Slown down! +500 | Internal Server Error -- We had a problem with our server. Try again later. +503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later. \ No newline at end of file diff --git a/source/index.md b/source/index.md index ff37953..6522143 100644 --- a/source/index.md +++ b/source/index.md @@ -7,8 +7,12 @@ language_tabs: - python toc_footers: - - Sign Up for a Developer Key - - Documentation Powered by Slate + - Sign Up for a Developer Key + - Documentation Powered by Slate + +includes: + - errors + --- # Introduction @@ -161,21 +165,3 @@ Parameter | Description --------- | ----------- ID | The ID of the cat to retrieve -# Errors - -The Kittn API uses the following error codes: - - -Error Code | Meaning ----------- | ------- -400 | Bad Request -- Your request sucks -401 | Unauthorized -- Your API key is wrong -403 | Forbidden -- The kitten requested is hidden for administrators only -404 | Not Found -- The specified kitten could not be found -405 | Method Not Allowed -- You tried to access a kitten with an invalid method -406 | Not Acceptable -- You requested a format that isn't json -410 | Gone -- The kitten requested has been removed from our servers -418 | I'm a teapot -429 | Too Many Requests -- You're requesting too many kittens! Slown down! -500 | Internal Server Error -- We had a problem with our server. Try again later. -503 | Service Unavailable -- We're temporarially offline for maintanance. Please try again later. \ No newline at end of file diff --git a/source/layouts/layout.erb b/source/layouts/layout.erb index 7ca0c55..04bab60 100644 --- a/source/layouts/layout.erb +++ b/source/layouts/layout.erb @@ -83,6 +83,11 @@ under the License.
<%= yield %> + <% if current_page.data.includes %> + <% current_page.data.includes.each do |include| %> + <%= partial "includes/#{include}" %> + <% end %> + <% end %>