Skip to content

apat59/hibernate.org

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to build hibernate.org

A bit of Git, a bit of Ruby and you will get your local hibernate.org served.

Prerequisites

  • Get Git

  • Get GNU Wget 1.14

  • If on Mac OS:

    • Get XCode (needed for native gems)

  • If on Linux:

    • Get libxslt-dev - eg via sudo apt-get install libxslt-dev

    • may be called libxslt1-dev for some distros

Note

For Linux Mint users - installing rvm (below) may not work. Be sure to instead install latest ruby-dev package via apt-get…​

Installation

Git

Install Git to your system. GitHub’s help page is a good starting point.

If you are looking for some tips and tricks, checkout Emmanuel’s blog.

RVM & Ruby

Ruby like many other platforms has its dependency hell. We do recommend you use RVM to isolate your ruby runtimes as well as dependencies (gems). The RVM steps are optional though. If you are not going to use RVM have a look at the different Ruby installations options you have.

curl -L https://get.rvm.io | bash
  • Set up the isolated environment for the site

rvm install 1.9.3
rvm use 1.9.3
rvm gemset create awestruct
Note

For some distros using the bash shell, you’ll need to enable "login shell". "rvm use" will complain, otherwise. See https://rvm.io/integration/gnome-terminal for more info.

  • RVM config (optional)

    Add a .rvmrc file in the directory containing

    rvm ruby-1.9.3@awestruct

    This will set up the right environment when you enter the directory. The first time, leave and re-enter the directory

    cd ..;cd hibernate.org

Get the source

Next, let’s retrieve the website.

git clone [email protected]:hibernate/hibernate.org.git
cd hibernate.org

Install Ruby dependencies

gem install bundler rake
rake setup[local]

Note that if someone updates Awestruct or any dependent gem via the Gemfile dependency management, you need to rerun bundle install.

Serve the site locally

Any change will be automatically picked up except for changes to _partials files.

Note

You might see warnings at startup like

WARNING: Missing required dependency to activate optional built-in extension coffeescripttransform.rb
  cannot load such file -- coffee-script
Using profile: development
Generating site: http://localhost:4242
Skipping files cache update.
CodeRay::Scanners could not load plugin :bash; falling back to :text
CodeRay::Scanners could not load plugin :bash; falling back to :text
CodeRay::Scanners could not load plugin :bash; falling back to :text
CodeRay::Scanners could not load plugin :bash; falling back to :text
CodeRay::Scanners could not load plugin :bash; falling back to :text
CodeRay::Scanners could not load plugin :bash; falling back to :text
[Listen warning]:
The blocking parameter of Listen::Listener#start is deprecated.
Please use Listen::Adapter#start for a non-blocking listener and Listen::Listener#start! for a blocking one.

That’s ok, it’s not your fault ;) It’s related to some Awestruct limitations.

Next steps

Using you local site, you can have a look at our survival guide to editing this website to get you started.

Tips & Tricks

If your changes are not visible…​

completely regenerate the site via:

rake clean preview

If serving the site is slow…​

On Linux, serving the file may be atrociously slow (something to do with WEBRick).

Use the following alternative:

  • Go in your ~/hibernate.org directory.

  • Run awestruct --auto -P development

  • In parallel, go to the ~/hibernate.org/_site directory

  • Run python -m SimpleHTTPServer 4242

You should be back to millisecond serving :)

License

The content of this repository is released under the ASL 2.0.

By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the respective licenses mentioned above.

Acknowledgements

This website uses JBoss Community Bootstrap.

About

Source for the hibernate.org website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 70.7%
  • Ruby 24.3%
  • CSS 4.6%
  • Shell 0.4%