Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

hekyll

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hekyll

Migrate Jekyll (gh-pages) themes to use handlebars instead of liquid.

Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

hekyll NPM version NPM monthly downloads NPM total downloads Linux Build Status

Migrate Jekyll (gh-pages) themes to use handlebars instead of liquid.

Install

Install with npm:

$ npm install --save hekyll

Usage

To run hekyll, you will need to pass an instance of gulp or assemble. This allows you to override any of hekyll's built-in tasks with a custom task.

var hekyll = require('hekyll');

hekyll(gulp_or_assemble, {
  task: 'hekyll', 
  theme: 'poole',
  themes: 'vendor',
  dest: 'src' //<= this will become your "handlebars" src templates
});

Options

  • task: the task name to use for running hekyll. Default is hekyll
  • theme: the name of the liquid theme to migrate. Example: poole
  • themes: the parent directory of the liquid theme. Example: themes. This is joined to the theme name at build time.
  • dest: the destination path for the converted theme.

Gulp example

Download a theme:

$ git clone https://github.com/poole/poole.git themes/poole

Then build with gulp:

var gulp = require('gulp');

hekyll(gulp, {
  task: 'hekyll', 
  theme: 'poole',
  themes: 'themes',
  dest: 'src' //<= this will become your "handlebars" src templates
});

gulp.task('default', ['hekyll']);

Assemble example

Download a theme:

$ git clone https://github.com/poole/poole.git themes/poole

Then build with gulp:

var assemble = require('assemble');
var app = module.exports = assemble();

hekyll(app, {
  task: 'hekyll', 
  theme: 'poole',
  themes: 'themes',
  dest: 'src' //<= this will become your "handlebars" src templates
});

app.task('default', ['hekyll']);

Choosing a theme

~20 jekyll themes were tested during the creation of this library, including all of the poole/poole themes from @mdo, and all of the built-in gh-pages themes. Most themes convert flawlessly, but some have nuances that might require some manual editing.

Handlebars helpers

To be able to render the migrated templates with handlebars, you will first need to include any missing handlebars helpers that were converted from liquid filters and tags during the migration.

Here are some libraries that might be useful for this:

Bug reports

If you find a bug or something that doesn't convert correctly, please let me know, I want this to work as seamlessly as possible.

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Please read the contributing guide for advice on opening issues, pull requests, and coding standards.

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.

This file was generated by verb-generate-readme, v0.6.0, on June 15, 2017.

Keywords

assemble

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts