/bluag

Simple blog platform built in Lua

Primary LanguageLuaMIT LicenseMIT

BLUAG

Blogging platform built in Lua for developers. (Verison 1.0.2)

Requirements:

  1. Linux style system. No Windows sorry (Need help with this.)
  2. Lua. Built and tested on Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
  3. Create you own github page http://pages.github.com/
  4. git

Installing:

  1. Fork the repository and download code.
  2. Run the following command to set your file structure:
  • lua generators/newblog.lua
  • Check out the file structure that was built (more about the structure bellow).
  1. Run the following to build the default blog:
  • lua generators/build.lua
  1. Make your _build directory the 'master' branch to your github pages project.
  2. Push your content inside your _build directory to your github pages.

Add A New Post:

  1. Run lua generators/new_post.lua [name of post]
  • Example: lua generators/new_post.lua my new post
  • A new html file in _sources/my-new-post.html will be created
  • The <title> of the post will be 'my new post'

Add A New Page:

  1. Run lua generators/new_page.lua [name of page]
  • Example: lua generators/new_page.lua travels
  • A new html file in _pages/travels.html will be created
  • The <title> of the page will be 'travels'

Build:

Once you have edited your code or created a new page just run:

  • lua generators/build.lua
  • This will run the build script and add the edited content to the _build directory.
  • You can view you content by either pushing to github pages or navigating to directory.

File Structure:

  1. _assets/
  • This holds your stylesheets and images.
  • On build, all folders and files in this directory get copied to _build/assets
  1. _build/
  • On build, this directory gets populated with your blog.
  • This is the directory you need to push to your github page
  1. _layouts/
  • Holds all layouts for your blog
  • On build, all pages and posts will use this layout unless specified to use another
  • If you want a page to use a different layout name the layout with the same name as the page. For example, if you add a about.html page to the _pages directory and you want to use a different layout for that page, create a about.html layout in the _layouts directory.
  1. _pages/
  • Add all and any new page to this directory
  • ALL PAGES REQUIRE A --title block
  1. _sources/
  • Put your blog posts in here
  • ALL POSTS REQUIRE A --title block
  1. _widgets/
  • A widget can be any small amount of html that you want
  • Add any widget that you want here
  • To use widgets just place {{widget_file_name}} anywhere in a page, blog post or layout. For example, if you want to use the recent_posts.html widget on a page place {{recent_posts}} somewhere on the source.
  • On build, all pages, layouts and posts will be tested for {{widget_name}} and appended if they exist.

Other Notes:

  1. For the most part Bluag is using twitter bootstrap for styling.

Contributing:

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Samples:

Please let me know or add you site to here

  1. http://guillecarlos.com