1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-26 23:14:40 +01:00
Go to file
2017-06-13 11:27:24 -04:00
scripts Add a script to run non-test *.go files 2017-06-11 14:57:12 -04:00
test Rename test collection -> c1 2017-06-13 11:00:35 -04:00
.gitignore Improved README 2017-06-11 19:40:01 -04:00
build.go Move Source, Dest to Site type; make Config private 2017-06-13 11:27:24 -04:00
collection.go Move Source, Dest to Site type; make Config private 2017-06-13 11:27:24 -04:00
helpers_test.go Write tests 2017-06-11 16:00:03 -04:00
helpers.go Make config a type w/ methods; add --dry_run 2017-06-13 11:00:24 -04:00
LICENSE Create LICENSE 2017-06-11 19:18:10 -04:00
link_tag.go Make config a type w/ methods; add --dry_run 2017-06-13 11:00:24 -04:00
liquid_filters_test.go Write tests 2017-06-11 16:00:03 -04:00
liquid_filters.go Add a where_exp filter 2017-06-11 14:57:25 -04:00
main.go Move Source, Dest to Site type; make Config private 2017-06-13 11:27:24 -04:00
page.go Move Source, Dest to Site type; make Config private 2017-06-13 11:27:24 -04:00
permalinks_test.go Add more permalink template variables 2017-06-13 08:51:58 -04:00
README.md Serve static files 2017-06-11 21:05:17 -04:00
server.go Make config a type w/ methods; add --dry_run 2017-06-13 11:00:24 -04:00
site.go Move Source, Dest to Site type; make Config private 2017-06-13 11:27:24 -04:00

Go Jekyll

When I grow up, I want to be a Go implementation of Jekyll.

Status

Go Report Card

This project is missing more functionality than it implements. It may accidentally work on tiny or simple sites, but I'd be surprised. Most egregious are an insufficiency of template variables, and limitations in the liquid library.

I'm writing this to learn my way around Go. It's not good for anything yet, and it may never come to anything.

Install

go get -t

Sometimes this package benefits from my unmerged improvements to the acstech/liquid library. If you want to use my fork instead:

cd $(go env GOPATH)/src/github.com/acstech/liquid
git remote add osteele https://github.com/osteele/liquid.git
git pull -f osteele

(See articles by Shlomi Noach and Francesc Campoy for how this works and why it is necessary.)

Run

./scripts/gojekyll --source test build
./scripts/gojekyll --source test serve
./scripts/gojekyll --source test render index.md
./scripts/gojekyll --source test render /

--source DIR is optional.

build needn't be run before server. The latter serves from memory.

server only rebuilds individual changed pages, doesn't rebuild collections, and doesn't detect new pages.

render renders a single file, identified by permalink if it starts with /, and by pathname (relative to the source directory) if it doesn't.

./scripts/gojekyll uses go run each time it's invoked. Alternatives to it are: go build && ./gojekyll ...; or go install && gojekyll ... (if $GOPATH/bin is on your $PATH). These would be nicer for actual use (where the gojekyll sources don't change between invocations), but they aren't as handy during development.

Credits

For rendering Liquid templates: the acstech/liquid fork of karlseguin/liquid.

The gopher image in the test directory is from Wikimedia Commons. It is used under the Creative Commons Attribution-Share Alike 3.0 Unported license.

Hugo isn't Jekyll-compatible (-), but actually works (+++).

Jekyll, of course.

License

MIT

Alternate Naming Possibilities

  • "Gekyll". (Hard or soft "g"? See gif.)
  • "Gekko"