…with some help from Travis + Middleman & Github

This is just a quick post coming straight from the great service Prose.io. Prose is a “beatifully simple content authoring environment for CMS-free websites” and is very easy to use.

Prose screenshot

This website is built with Middleman which enables easy development and great blog functionality. It handles the building of a static site and assets, but the deployment of a site can go many different ways.

This site has historically been hosted on GH Pages and is now on Amazon S3. The deployment process will change slightly with different providers.

Prose & Middleman

Most of the documentation you’ll find involves setting up Prose with Jekyll, which after having tested personally is a very smooth process and one I’d recommend if you don’t have a log yet at all. With the site already being a Middleman project, it was not too difficult to integrate it without using any Jekyll special sauce… HEADS UP: Non-jekyll projects use a _prose.yml rather than within a Jekyll _config.yml.

In _prose.yml

            rooturl: 'source/blog'
            media: 'source/assets/images'
                - name: "title"
                    element: "text"
                    label: "Title"
                    value: ""
                - name: "author"
                    element: "text"
                    label: "Author"
                    value: ""
                - name: "tags"
                    element: "multiselect"
                    label: "Tags"
                    alterable: true
                      - name: 'Tech'
                        value: 'tech'

Along comes Travis…

If you’re using a User page on GH Pages with Prose & Jekyll then you’re already finished!

If you’re using another tool (Maybe Gulp? We use Gulp pretty much everywhere else, MM is just great for blogs!) then you’ll need to either manually deploy those changes committed by Prose or get a service/hook to do this for you. We do this with Travis.

In .travis.yml

language: ruby
            - 2.1.2
              - master
            # Anything required by your build process...
            - npm install -g grunt-cli
            - npm install -g bower
            - bower install -f
            # Place your regular build/deploy chain here...
            - "bundle exec middleman build && bundle exec middleman s3_sync"

FYI: Both .travis.yml & _prose.yml will need to be in the root of your repo.

I found this gist very helpful to get started on this process. Also this article is great if you’re new to Travis.

This is far simpler than the alternative of installing Ruby/Git/etc. Now for those who just want to write blog articles, the process can be as simple as:

  1. Content writer creates blog article
  2. It’s on the website (in a few mins after Travis build finishes…)

Adding this integration streamlines the process of publishing content for a non-technical member of the team.

Originally published on netengine.com.au