Giter Club home page Giter Club logo

jkl's Introduction

jkl is a static site generator written in Go, based on Jekyll

Build Status

Notable similarities between jkl and Jekyll:

  • Directory structure
  • Use of YAML front matter in Pages and Posts
  • Availability of site, content, page and posts variables in templates
  • Copies all static files into destination directory

Notable differences between jkl and Jekyll:

  • Uses Go templates
  • Only supports YAML front matter in markup files
  • No plugin support

Additional features:

  • Deploy to S3

Sites built with jkl:


Installation

In order to compile with go build you will first need to download the following dependencies:

go get github.com/russross/blackfriday
go get launchpad.net/goyaml
go get launchpad.net/goamz/aws
go get launchpad.net/goamz/s3
go get github.com/howeyc/fsnotify

Once you have compiled jkl you can install with the following command:

sudo install -t /usr/local/bin jkl

If you are running x64 linux you can download and install the pre-compiled binary:

wget https://github.com/downloads/bradrydzewski/jkl/jkl
sudo install -t /usr/local/bin jkl

Usage

Usage: jkl [OPTION]... [SOURCE]

      --auto           re-generates the site when files are modified
      --base-url       serve website from a given base URL
      --source         changes the dir where Jekyll will look to transform files
      --destination    changes the dir where Jekyll will write files to
      --server         starts a server that will host your _site directory
      --server-port    changes the port that the Jekyll server will run on
      --s3             copies the _site directory to s3
  -v, --verbose        runs Jekyll with verbose output
  -h, --help           display this help and exit

Examples:
  jkl                  generates site from current working dir
  jkl --server         generates site and serves at localhost:4000
  jkl /path/to/site    generates site from source dir /path/to/site

Auto Generation

If you are running the website in server mode, with the --server flag, you can also instruct jkl to auto-recompile you website by adding the --auto flag.

NOTE: this feature is only available on Linux

Deployment

In order to deploy to S3 you must include a _jekyll_s3.yml file in your site's root directory that specifies your AWS key, secret and bucket:

s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
s3_bucket: your.blog.bucket.com

Run jkl --s3

Documentation

See the official Jekyll wiki ... just remember that you are using Go templates instead of Liquid templates.

jkl's People

Contributors

abh avatar arathorn2nd avatar bradrydzewski avatar gyepisam avatar liamstask avatar tv42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jkl's Issues

Basepath variable

If I have a page in services/index.html and use my default layout which links to my css /css/bootstrap.css it cannot find it, only pages in the / root works. As I understand in Jekyll you solve it with a basepath variable infront of css/ and img/ in layouts but could not find anything like that in the code.

Is it a config error or a missing future?

Parsing deploy config fails unless struct tags are modified

If I create a _jekyll_s3.yml file as described, parseDeployConfig returns a DeployConfig struct with all zero values. But if I apply the following patch, it reads the values into the struct correctly.

diff --git a/config.go b/config.go
index 5d0bd43..6dd8b18 100644
--- a/config.go
+++ b/config.go
@@ -54,9 +55,9 @@ func parseConfig(data []byte) (Config, error) {
 // DeployConfig represents the key-value data in the _jekyll_s3.yml file
 // used for deploying a website to Amazon's S3.
 type DeployConfig struct {
-       Key    string `s3_id:""`
-       Secret string `s3_secret:""`
-       Bucket string `s3_bucket:""`
+       Key    string `s3_id`
+       Secret string `s3_secret`
+       Bucket string `s3_bucket`
 }

Are you using an old version of launchpad.net/goyaml, perhaps? (I just made sure I am on the latest version of goyaml.)

OSX support

Any plans to support this on OSX? The current use of inotify means it won't build there.

Pointers to make it work (newcomer to Go) also welcome.

Thanks

nested layout support?

Hi! Thanks for jkl - so far it seems like a nice, simple alternative to Jekyll that retains most of its good qualities.

I'm converting a simple site, and have a layout (post) that, in its front matter, specifies a parent layout (default). I'm not seeing the parent layout get applied, which is a bit of a pain since otherwise I need to duplicate the main page structure in both my post and default layouts.

Have I missed a way to do this with jkl, or is it currently not supported? I'd be willing to dig in and submit a pull request if that would be desirable.

License

What license is this released under? Thanks!

feature request: gzip

I have a feature request, when it generates the pages and so fort if you can add a configuration option like --gzip to have it gzip files to *.gz so you can use it with nginx gzip static module (http://wiki.nginx.org/HttpGzipStaticModule)

I'm trying to learn to code and specially golang but aren't there yet so I can make a Pull Request for you ;)

dont panic on yaml frontmatter with non string

If you set something like


categories: [test, linux]

jkl will panic as it doesn't understand that type due to expecting a string. Maybe something to either ignore or log the error would be helpful. This was mainly coming up for me when migrating existing jekll/octopress posts that allow categories tag into jkl.

thanks!

go get'ing

Any reason for go get'ting the dependencies and building/installing manually over just go get'ting jkl itself?

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.