README.md in rack-blogengine-0.1.7 vs README.md in rack-blogengine-0.1.8

- old
+ new

@@ -2,47 +2,60 @@ Rack Middleware to serve a simple blog ## Installation -Add this line to your application's Gemfile: + $ gem install rack-blogengine - gem 'rack-blogengine' +## Usage -And then execute: +`rack-blogengine generate <folder>` will create your Folder skeleton - $ bundle +### Structure -Or install it yourself as: +These folders and files will be created for you - $ gem install rack-blogengine +#### Folders +`targetfolder/assets` -## Usage +`targetfolder/assets/style` -`rack-blogengine generate <folder>` will create your Folder skeleton +`targetfolder/assets/js` -### Structure +`targetfolder/assets/layout` -`targetfolder/layout` - save your layout.html in this folder +`targetfolder/assets/images` -`targetfolder/assets` - your assets (images, js, css etc) will be served from this folder (http://pathtoapp.tld/assets) +`targetfolder/operator` -`targetfolder/test.content` - your available blog entries matches to the .content files, each .content file is a blog entry +#### Files +`targetfolder/assets/style/style.css` +`targetfolder/assets/js/script.js` + +`targetfolder/assets/layout/layout.html` (filled with basic structure) + +`targetfolder/index.content` (filled with dummy content) + +`targetfolder/config.yml` (basic config setup - server: webrick, port: 3000) + +`targetfolder/operator/operator.rb` (define your operator methods in module UserOperator) + ### Layout -In the layout.html you use {title} and {content} which will then be populated with the values from each .content file +In the layout.html you use {title}, {content} and {date} which will then be populated with the values from each .content file Example: ```html <!DOCTYPE html> <html> <head> <title>{title}</title> </head> <body> <h1>{title}</h1> <div> + {date} {content} </div> </body> </html> ``` @@ -51,9 +64,11 @@ The Content files (.content) includes your content `[path][/path]` - this will be your access path to your blog entry `[title][/title]` - the title for your article + +`[date][/date]` - publishing date of your article `[content][/content]` - your content ### Hint For a root document (http://pathtoapp.tld/) path should be empty ([path]:[/path])