All Projects → riichard → jekyll-rest-api

riichard / jekyll-rest-api

Licence: other
Read-only REST API for Jekyll, making it easy to fetch all posts/settings in JSON for javascript search or advanced queries.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to jekyll-rest-api

tactile
Tactile is a Jekyll theme for GitHub Pages
Stars: ✭ 70 (+288.89%)
Mutual labels:  jekyll, github-pages
jekyll-theme-Hydrogen
👍轻盈、简洁的Jekyll主题,A Lightweight and Concise Jekyll theme For You.
Stars: ✭ 60 (+233.33%)
Mutual labels:  jekyll, github-pages
Millennial
A minimalist Jekyll theme for running an online publication
Stars: ✭ 223 (+1138.89%)
Mutual labels:  jekyll, github-pages
Mm Github Pages Starter
Minimal Mistakes GitHub Pages site starter
Stars: ✭ 191 (+961.11%)
Mutual labels:  jekyll, github-pages
docshub
API Documentation Browser based Github Pages Service
Stars: ✭ 58 (+222.22%)
Mutual labels:  jekyll, github-pages
Slate
Slate is a Jekyll theme for GitHub Pages
Stars: ✭ 195 (+983.33%)
Mutual labels:  jekyll, github-pages
markdownslides
A "markdown-first" approach for generating beautiful browser-based slides easily. Based on Reveal.js and Reveal-Jekyll.
Stars: ✭ 37 (+105.56%)
Mutual labels:  jekyll, github-pages
Primer
Primer is a Jekyll theme for GitHub Pages
Stars: ✭ 160 (+788.89%)
Mutual labels:  jekyll, github-pages
amphp.github.io
Main website repository.
Stars: ✭ 21 (+16.67%)
Mutual labels:  jekyll, github-pages
google-sheet-to-github-website
This is a working project for operating a data driven website on Github Pages using Google Sheets as a data source.
Stars: ✭ 20 (+11.11%)
Mutual labels:  jekyll, github-pages
Fast template
A template for really easy blogging with GitHub Pages
Stars: ✭ 184 (+922.22%)
Mutual labels:  jekyll, github-pages
CodeForAfrica.org
The @CodeForAfrica landing page. Built with Jekyll and hosted on Github Pages. Accessible at https://codeforafrica.org/
Stars: ✭ 20 (+11.11%)
Mutual labels:  jekyll, github-pages
Architect
Architect is a Jekyll theme for GitHub Pages
Stars: ✭ 182 (+911.11%)
Mutual labels:  jekyll, github-pages
Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (+15944.44%)
Mutual labels:  jekyll, github-pages
Oscailte
Oscailte — A powerful light, clean, and responsive Jekyll theme.
Stars: ✭ 178 (+888.89%)
Mutual labels:  jekyll, github-pages
Just The Docs
A modern, high customizable, responsive Jekyll theme for documention with built-in search.
Stars: ✭ 3,747 (+20716.67%)
Mutual labels:  jekyll, github-pages
Gottovote
GotToVote is a toolkit of simple web and SMS services that help citizens get to the ballot box informed and ready to vote. Kenya version accessible at https://kenya.gottovote.cc
Stars: ✭ 150 (+733.33%)
Mutual labels:  jekyll, github-pages
Midnight
Midnight is a Jekyll theme for GitHub Pages
Stars: ✭ 155 (+761.11%)
Mutual labels:  jekyll, github-pages
fuse-core
The 'Fuse Core' Jekyll theme.
Stars: ✭ 29 (+61.11%)
Mutual labels:  jekyll, github-pages
harttle.github.io
Harttle Land 的源码和文章
Stars: ✭ 118 (+555.56%)
Mutual labels:  jekyll, github-pages

Jekyll REST API

This is a read only JSON API, making it easier to connect third party systems to your content, or do more advanced renderings with javascript on your jekyll site that can't be done with the liquid syntax.

Table of contents

Ideas of what you can build with this API:

  • Search through all your Jekyll posts with javascript, without having to parse the HTML.
  • Define settings for your javascript via your _config.yml.
  • Create a javascript code that will alert the user on the screen when there is a new post available.
  • Apply filters to the post content before rendering, such as wrapping all images in a different code for a lightbox system.

Installation

Via git submodule

Installing
git submodule add 'https://github.com/riichard/jekyll-rest-api'
Usage
http://myjekyllsite.com/jekyll-rest-api/posts.json

This also works like a charm on .github.io URLs.

Via bower

Installing
bower install jekyll-rest-api
Usage
http://myjekyllsite.com/bower_components/jekyll-rest-api/posts.json

Output examples

All output examples can also be found in the output-example folder.

/posts.json

[
		{
            "id"         : "/The unique ID of the post",
            "title"      : "The title of the post",
            "category"   : "demo",
            "tags"       : "demo,test",
            "url"        : "/url-according-to-config-defined-formatting",
            "path"       : "_posts/2015-07-21-demo.md",
            "next"       : "/path-to-next-post-or-empty-string",
            "previous"   : "/path-to-previous-post-or-empty-string",
            "date"       : "2015-07-26 04:00:00 -0400",
            "shortdate"  : "July 26, 2015",
            "content"    : "<p>Escaped content</p>",
            "excerpt"    : "<p>First paragraph of post</p>",
		} 
        ....
]
JSONP - Cross domain access

To access this file cross domain, you can load /posts.js and create a callback function called jekyllPostsCallback. Due to technical limitations of static file servers it's not possible to pass a custom callback function name.

/settings.json

{
    "title": "Richard A. Kraaijenhagen",
    "description": "Full Stack Developer & Data Scientist/Visualizer. Founder Owlin.",
    "default_bg": "avatar_45.jpg",
    "search": "true",
    "share": "true",
    "readtime": "true",
    "wpm": "200",
    "baseurl": "",
    "fin_color": "255,255,255",
    "timezone": "America/New_York",
    "encoding": "utf-8",
    "categories": [
        "owlin"
    ],
    "tags": [
        "owlin",
        "vim"
    ],
}

This will contain all keys defined in _config.yml. Due to a conflict with jekyll, this file couldn't be named config.json but is named settings.json instead.

JSONP - Cross domain access

To access this file cross domain, you can load /settings.js and create a callback function called jekyllSettingsCallback. Due to technical limitations of static file servers it's not possible to pass a custom callback function name.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].