Giter Site home page Giter Site logo

post_revision's Introduction

Show Post's Revision History For Jekyll/Octopress Powered Sites

This plugin provide a Liquid tag to generate blog post's revision history, which are merely commit messages when you do git commit. See a demo on this site.

Installation

Put revision.rb to your /_plugins/ (for Jekyll) or /plugins/ (for Octopress) directory of your blog source root.

Configuration

If your blog source are hosted on Github, you can set two optional configurations in your _config.yml. Then this plugin will also generate links to Github commit history for each post.

  • github_user: your user name on Github
  • github_repo: your blog source repo name on Github. More specifically, for Jekyll sites hosted on Github Pages, this should be SOMEBODY.github.[io][com].

Usage

Put revision.html somewhere in your _include (for Jekyll) or source/_include (for Octopress) directory. And include this html file somewhere in your post layout file.

One optional argument, limit, is accepted by the revision tag. It specifies the maximum git-log number. It's default value is 5.

Notes

When generate Github commit history links, this plugin assumes that:

  • If you specify source in your _config.yml, then blog posts are in source/_posts directory. (For Octopress sites)

  • Otherwise, blog posts should be in _posts directory. (For Jekyll sites)

If this assumption is not right in your case, then you'll probably need to tweak the url patterns a little bit.

post_revision's People

Contributors

jhshi avatar

Watchers

Hoat Le avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.