jekyll static site quickstart
This is directly from jekyllrb.com, the main website for jekyll.
gem install bundler jekyll jekyll new my-awesome-site cd my-awesome-site bundle exec jekyll serve # => Now browse to http://localhost:4000
Once you’ve installed and started all you have to do is goto your website directory in terminal and type the
bundle exec jekyll serve
This is important because it will autobuild your site. Also all of your links will be relative to the root directory so you can’t really run the site effectively without serving it like a server would.
To Stop the Server
Hit cntrl+c in terminal.
Serving the Site on a production server
Upload your _site directory to the root of your server. You can also make your jekyll project a git repo and execute a git pull on the project which will pull down all of the rendered files in the _site directory. In order for the _site directory to be served you will need to configure your apache or nginx server to serve the _site directory as the directory folder
<VirtualHost *:80> ServerName domain.com ServerAlias www.domain.com DocumentRoot "/var/www/html/jekyll_website/_site/" DirectoryIndex index.html