Middleman Website
Setup in development
-
Install rbenv and ruby-build
-
Clone project and cd into project directory
git clone repo-path.git
cd project-dir
- Install Ruby version set in
.ruby-version
rbenv install && rbenv rehash
- Setup local ruby (this number should reflect the ruby version that was just installed)
rbenv local 2.1.5
-
Install JavaScript runtime You need a JS runtime. For Nodejs, I suggest installing via nvm. For therubyracer, add
gem "therubyracer": "x.x.x"
to your Gemfile, then runbundle install
-
Install dependencies
gem install bundler && bundle install
-
Copy
source/environment_variables.rb.sample
tosource/environment_variables.rb
-
Set
site_url_production
andsite_url_development
insource/environment_variables.rb
-
Start Middleman server
bundle exec middleman
Building
- Run the following to build your website locally into a
build
folder
bundle exec middleman build
Building
bundle exec middleman build
Deploying
This is not setup yet.
Middleman-deploy can deploy a site via rsync, ftp, sftp, or git. Configure the deployment section of config.rb
, then run the deploy command. Note, this will build for you before deploying.
bundle exec middleman deploy