Ruby + ERB based html page generator. Ambiguously uses the word "Site" to create pages, layouts, granules and assets based structure, and generate the site to produce html pages along with their associated assets.
Page is the single-alone entity that doesn't depend on other entity and the entity considered to be the main content. It goes with a ruby file where data can be initialized and an ERB template where the data initialized from the ruby file is used. It can set layout and includes granules along with passing data into them.
Layout depends on a page. With passed data from the page, it can also includes granules along with passing data into granules.
Granule acts like both stand-alone and depended-entity depending on the passing data into itself.
Assets are not processable files by the generator, which are included by their path. Any of 'em (page, layout, granule) can include them.
Download the repository:
$ git clone https://github.com/mash-97/shpg.gitmake shpg as cd:
$ cd shpgrun:
shpg$ bundle installand:
shpg$ rake installor by using gem inside the extracted repository:
shpg$ gem build shpg
shpg$ gem install --local shpgAfter installing the gem, shpg should be available as cli program in the system. So, first we need to create a new site by create_site command. Considering a site with the name mango:
$ shpg create_site mangoA basic structure for the site should be available inside the mango directory with a index page. We can create page by create_page command. Considering a page with the name fazlee:
$ cd mango
mango$ shpg create_page fazleeAfter making changes in pages, pages can be generated by generate command.
mango$ shpg generateIn default, the generated contents will be available inside the output directory. The site can be visited by starting a server:
mango$ shpg serveror manually.
It's like a home-made micro-framework. Intended for a specific work to be benefited by.