How to host a website built with carew?

Behind a webserver#

If you have a webserver, just copy the content of the web folder to the document root of your web server.


How to host carew on github ?

Github can host static pages. It's very easy thanks to carew.

Start by creating a new project with composer:

$ mkdir my_site
$ cd my_site
$ git init
$ php composer.phar create-project carew/boilerplate _carew

To make it easier to build your website, you can setup a script in _carew folder:


BASE=`dirname $0`
$BASE/vendor/bin/carew carew:build --base-dir=$BASE --web-dir=$BASE/..

Then you can build the website with _carew/ command. Now, you can commit and push everything to your github repository:

$ git add .
$ git commit -m "Inital commit"
$ git remote add origin
$ git push -u origin master

Now, you can browse