Skip to content

The minimum steps to create a fully functional Grails blog with the simple-blog plugin.

Notifications You must be signed in to change notification settings

dexterous/grails-blog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

$ grails create-app grails-blog
$ cd grails-blog
$ git init
$ cat >> .gitignore
> /.classpath
> /.project
> /.settings
> /web-app/WEB-INF
> /target
> ^D
$ git commit -m "Importing vanilla Grails app (withoug eclipse crap!)"
$ grails install-plugin simple-blog
$ git commit -m "Installing simple-blog plugin with depns"
$ cat >> grails-app/conf/Config.groovy
> grails.blog.author.evaluator = { request.remoteAddr }
> ^D
$ git commit -m "Configured simple-blog to use remote IP as posters ID"
$ mkdir -p grails-app/domain/demo/blog/
$ cat > grails-app/domain/demo/blog/Commenter.groovy
> package demo.blog
>
> class Commenter {
>   String addr;
>   String toString() { addr }
> }
> ^D
$ cat >> grails-app/conf/Config.groovy
> import demo.blog.Commenter
> grails.commentable.poster.evaluator = { Commenter.findByAddr(request.remoteAddr) ?: new Commenter(addr: request.remoteAddr).save() }
> ^D
$ git commit -m "Configured commentable plugin to use remote IP as commenter's ID
> 
> Had to create Commenter model as commentable require a persistent poster entity"
$ git upgrade
$ git mv grails-app/domain/demo/blog/Commenter.groovy grails-app/domain/demo/blog/RemoteAddr.groovy
$ vi grails-app/domain/demo/blog/RemoteAddr.groovy
$ vi grails-app/conf/Config.groovy
$ vi git add grails-app/conf/Config.groovy
$ git commit -m "Renamed Commenter to RemoteAddr an reused as poster id as well"

About

The minimum steps to create a fully functional Grails blog with the simple-blog plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published