Giter Club home page Giter Club logo

hibernate.org's Introduction

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.

hibernate.org's People

Contributors

apat59 avatar brmeyer avatar cheyenneweaver avatar csadilek avatar davided avatar emmanuelbernard avatar gunnarmorling avatar hferentschik avatar insectengine avatar leslieyork avatar lightguard avatar newtonm avatar sanne avatar sebersole avatar unibrew avatar xcoulon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.