Skip to content

Commit

Permalink
Merge remote-tracking branch 'stone/config'
Browse files Browse the repository at this point in the history
Incorporate fixes and features from stone
  - Switch to Go1 support
  - Switch config to JSON, remove old config
  - Add flags

Add Url value to page object

Change "template" directory name to "source", more accurately
represents what the directory is. Template is confusing.

Remove generated files, no need to be in repo

Switch blackfriday library to fork which works with Go1

Conflicts:
	README.md
  • Loading branch information
mkaz committed Mar 2, 2012
2 parents aebc71e + 6467540 commit 2468e0a
Show file tree
Hide file tree
Showing 10 changed files with 354 additions and 508 deletions.
60 changes: 41 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

## Hastie - Static Site Generator in Go

Author : Marcus Kazmierczak
http://mkaz.com/
Author :

- Marcus Kazmierczak, http://mkaz.com/
- Fredrik Steen, http://github.com/stone

Started: Feb 13, 2012
Project: https://github.com/mkaz/hastie


Hastie is intended as replacement of jekyll (for myself), but jekyll has a robust plugin, extensibility and community that I do not expect to even attempt. If you are looking for a flexible tool to publish your site use jekyll.

If you are looking for a tool to tweek and play with the Go language, then this might be your choice. Most customizations will probably require code changes. The reason I created the tool was to learn Go, I'm publishing to hopefully help others with playing with the language.
Expand All @@ -18,27 +18,36 @@ Note: The name Hastie also comes from the novel Dr. Jekyll and Mr. Hyde

## Install Notes

You need Go binaries already installed see: http://golang.org/doc/install.html
Untill Go v1.0 is released you need to install Go Weekly: <http://golang.org/doc/install.html#fetch>

For my Mac I use homebrew, so it was simply a matter of: `brew install go`
$ cd $HOME
$ hg clone -u weekly https://go.googlecode.com/hg/ go
$ cd $HOME/go/src; ./all.bash
$ echo "GOROOT=$HOME/go" >> $HOME/.bashrc

For my Linux environments I use a Debian variant so you can install with: `apt-get install golang`

#### Libraries

Uses **blackfriday** for markdown conversion. `goinstall github.com/russross/blackfriday`
Uses **blackfriday** for markdown conversion. `go get github.com/russross/blackfriday`

Uses **goconf** for reading configuration file `goinstall goconf.googlecode.com/hg`

If the above does not work for gconf, try
--------------------------------------------------------------------------------

## Usage

cd $GOROOT/src/pkg/goconf/googlecode.com/hg
gomake install`
usage: hastie [flags]
-c="hastie.json": Config file
-h=false: show this help
-v=false: verbose output

Configuration file format (default ./hastie.json)

--------------------------------------------------------------------------------
{
"TemplateDir": "posts",
"LayoutDir": "layouts",
"PublishDir": "public"
}

## Usage

Hastie walks through a templates directory and generates HTML files to a publish directory. It uses Go's template language for templates and markdown for content.

Expand Down Expand Up @@ -67,7 +76,6 @@ A few current limitations:
* all files must be have .md extension
* sub-directories are only one level deep


The usage of hastie is just as a template engine, it does not copy over any images, does not have a built-in web server or any of the other features that jekyll has.

I keep the `public` directory full with all of the assets for the site such as images, stylesheets, etc and hastie copies in the html files. So if you delete a template it won't be removed from `public`
Expand Down Expand Up @@ -96,16 +104,30 @@ Data available to templates:
* Read .html files and apply template, no markdown
* Add ability to support rss.xml

* Command Line Arguments (--verbose, --help)



--------------------------------------------------------------------------------

### CHANGE LOG

ver 0.2

* In config, renamed `template_dir` to `source` This more accurately describes the directory, what I was thinking was templates to be expanded are really the source files for the site.

* Added Url parameter to templates
ver 0.3

* Merged Fredrik Steen changes in github.com/stone/hastie

* Switched config to json format
- removed dependency on old config

* Moved to Go1 support




ver 0.2 (unreleased)

* In config, renamed `template_dir` to `source` This more accurately describes the directory, what I was thinking was templates to be expanded are really the source files for the site.

* Added Url parameter to templates

Loading

0 comments on commit 2468e0a

Please sign in to comment.