Make Plugins

You may extend Jekyde through the following three types of plugins.

  1. Content plugins for extending Markdown syntax
  2. Template plugins for creating new Swig tags
  3. Website plugins for generating more webpages

Content Plugins

The following code is the builtin gist plugin:

jekyde.extend.content(function(site, text){
    return text.replace(
        /\n\^\^ *gist +(\w+)\n/g,
        '<script src="$1.js"></script>'

With this gist plugin, you can insert a gist in your markdown file with a single line like this:

^^gist 12345678

Template Plugins

The following code is the builtin ctime plugin:

jekyde.extend.template('ctime', function(args, content){
    return (new Date()).toISOString();
}, false);

With this plugin, you can insert current time into your template file with this code:

{{ ctime }}

Website Plugins

The following code is part of the builtin atom plugin:{
    var atom = [
    '<?xml version="1.0" encoding="UTF-8"?>',
    '<feed xmlns="">',
    '    <title><![CDATA[' + site.title + ']]></title>',
    '    <link href="' + + site.root + 'atom.xml" ref="self"/>',
    '    <link href="' + + site.root + '"/>',
    '    <id>' + + site.root + '</id>',
    '    <updated>' + new Date().toISOString() + '</updated>',
    return [['atom.xml', atom]];

This plugin generates atom feed file atom.xml inside root folder.

Your Plugins

You may put your plugins into template/plugin folder.