Skip to content

Commit

Permalink
tweaked the template readme slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
reinbach committed Apr 4, 2015
1 parent 4301a3f commit 677f731
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There is an overview of the these sections at [http://reinbach.com](http://reinb

### Parts

* [Template](https://github.com/reinbach/golang-webapp-guide/tree/master/template)
* [Templating](https://github.com/reinbach/golang-webapp-guide/tree/master/template)

## License

Expand Down
10 changes: 8 additions & 2 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@

## Template

Here we cleaned up the code and move the templating functionality into a separate package. This will allow us to isolate that functionality.
This is a minor change to the [HTML](https://github.com/reinbach/golang-webapp-guide/tree/master/html) application we had. The following are the major changes that we make;

At this point we also start to make use of our first external package, which is [Goji](github.com/zenazn/goji/web). Goji is a web microframework and provides us with flexible routing and extensible middleware.
* move the rendering function, the templates and static files into a separate directory for better organization.
* add `context` functionality, this allows us to pass data to the templates
* and we are able to pass a list of templates to be rendered.

At this point we also start to make use of our first external package, which is [Goji](github.com/zenazn/goji/web). Goji is a web microframework and provides us with flexible routing and extensible middleware. We will probably make use of one more external package further down.

### Usage

Template files are now placed in the `template/html` directory and statis files are placed in the `template/static` directory.

go run server.go

0 comments on commit 677f731

Please sign in to comment.