Hera
What is Hera?
Hera, from HydraulicLabs, is an elegant and easy to use static web site architecture. Implementing Jekyll, Haml, Sass, & Jammit to bring a static website to life fast. Hera was developed to reduce setup time, promote clean code, and instantly set up the typical dependencies when working with popular web frameworks.
Now follow Hera on Twitter at @herasites for easy access to gem and source updates.
How to use Hera.
Install the gem:
gem install hera
– the hera gem is hosted on rubygems.org/gems/hera
Initialize hera
hera --init
– Clones a copy of a base Hera structure and autogen the configs.
Start watching hera
hera --watch
– Starts watching your haml and sass directories, automatically compiling them.
Minimize your assets
hera --minimize
– Runs Jammit to minimize your css and js scripts. – add any new css/js to _assets.yml.
Generates the hera site
hera --generate
– Generates your Jekyll site and starts a preview at http://localhost:4000
Deploy hera
hera --deploy
– Auto-uploads your site for you. – make sure to update ssh_user and remote_root in the site’s RakeFile
Dependencies
The gems listed below will be installed automatically via Bundler when you install Hera. If you are running into errors with any of the commands please compare your gem list
to the list below. You may have inadvertently un-installed one of the gems causing Hera to not work correctly.
- github 0.6.2 –
gem install github
- growl 1.0.3 –
gem install growl
- growl_notify 0.0.1 –
gem install growl_notify
- guard 0.7.0 –
gem install guard
- guard-rake 0.0.1 –
gem install guard-rake
- haml 3.1.3 –
gem install haml
- jammit 0.6.3 –
gem install jammit
- jekyll 0.11.0 –
gem install jekyll
- rb-fsevent 0.4.3.1 –
gem install rb-fsevent
- sass 3.1.7 –
gem install sass
Typical workflow
gem install hera
-
cd
to where you want to install the core structure, typically an empty directory. -
hera --init
to install the core structure and generate the config files.- _hera_config.yml is created to use as a config for generating the guard and rake files.
- Guardfile is created to watch the haml and sass source directories.
- Rakefile is created to house the automation scripts for guard, jekyll and rsync.
-
hera --watch
to start watching and auto-compiling your source. - Within
_source/_layouts
you can edit the templates:-
/haml
contains the main Jekyll layout templates. -
/pages
contains the site pages. -
/posts
contains the site posts. -
/sass
contains the site css templates
-
- Once you are ready to deploy:
-
CTRL + C
to stop watching Hera -
hera --generate
to build the jekyll site and launch a preview at http://localhost:4000. -
CTRL + C
to stop the Jekyll preview, once you are ready to minimize your assets. -
hera --minimize
to minimize the css and js assets prior to deploying.- currently there is a bug that causes you to edit the _asset.yml files before the minimizer will work.
-
hera --deploy
to deploy your site, via rsync/ssh.- Please make sure to update your credentials in the top of
/RakeFile
- Please make sure to update your credentials in the top of
-
- Send me feedback, critiques, cake, and most importantly: fork and contribute.
Templates
Hera installs a core structure, already developed to fit a rapid workflow. This structure can be found and forked at hera-site. Future plans include the ability to allow developers to submit template structures to be used in Hera, for instance a basic blog, app or product site, etc.
Working Sample
Props
Tom Preston-Werner : Jekyll
Twitter : Bootstrap
Haml
Sass
Jammit
Guard
Guard-Rake
Github gem
Garth Braithwaite, Kevin Suttle, Todd Anderson & Ben Borowski : For moral support.
License
Copyright © 2011 Brian Connatser
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.