The ThinkShout.com website, built with Jekyll, Foundation 5, SASS, and lots of love.
- Dev: New feature development.
- Master: New content. Features from Dev merged into master. Pushed to stage.
- Live: Mapped to production. No commits, only merges from master.
Something along the lines of the following should be used by developers working on this site.
- Clone the repository if you don't have it.
- Checkout the dev branch,
git checkout dev
. - Make sure you're current,
git pull origin dev
. - Optionally grab the latest content by rebasing master from the dev branch,
git rebase master
.' - Create a feature branch off of dev,
git checkout -b myfeature
. - Make magic happen
- Merge your feature into dev,
git checkout dev && git merge myfeature
. Clean up and delete your feature branch. - Run
rake serve
and make sure all is well. - Push your exciting new feature,
git push origin dev
. - If it's ready for staging, merge into master,
git checkout master && git merge dev && git push origin master
. - Optionally deploy to staging,
rake stage
. - To launch the new feature,
git checkout live && git merge master
. Then publish,rake publish
.
Blog posts should be managed via prose.io. Visit the website and, when prompted, authorize via GitHub. Select the thinkshout/thinkshout project. Prose will only make the blog post folder accessible. You can create new posts by clicking the large green "new file" button at the top of the page (see below "New Posts section"). Existing posts can be edited by clicking on the file in the list. When editing or creating a post, the metadata button on the right side will load with the available variables that can be filled in, including teaser, author name, and tags.
It is important that the file name of the post uses the following format: blog/_posts/[date]*.md
Where "*
" is the title of your post (with no spaces - use dashes instead).
For example the default blog/_posts/2014-03-14-your-filename.md
file name could be changed to blog/_posts/2014-03-14-my-new-blog-post.md
.
This is necessary because Jekyll uses this field value to generate the Markdown file that will be complied into your blog post, which must be in the blog/_posts
directory and be named with a leading date.
Head to the metadata tab using the button on the right and specify your title in the "Raw Metadata" field as follows:
title: "My New Blog Post"
If you do not specify a title, Jekyll will generate one for you based on the name of your file by replacing dashes with spaces and capitalizing the first letter of each word.
- Short teaser - text that will display below the linked title in post teaser (used, for example, on the /blog page)
- Author short name - makes your picture, name, and job title show up in the post teaser.
- Featured - check to get a post to show on the home page.
- Tags - ??? can't figure out how to add existing tags to new posts that don't have any - old posts have select list options, but that's because there are tags already defined in their front matter ////Alex
- Raw Metadata - any other YAML front matter you'd like to include (case sensitive).
To get a post to show on the home page, add featured: true
to the post's YAML front matter. This will also add a class of featured-post
across the site for styling convenience.
Click on the preview (eye) button on the right hand side. If you don't see images, etc. that you're referencing in your Markdown it's because they're not pushed to the repo (master branch).
The site is hosted on Amazon S3 where we have 2 buckets, one for staging mapped to http://stage.thinkshout.com and one for production mapped to our apex domain, http://thinkshout.com. A build on Travis CI will be triggered by any commit to master or live. Travis CI will:
- Compile the CSS using Compass.
- Build the site using Jekyll.
- Deploy the code to the appropriate S3 bucket: master will push to the private staging site and live to thinkshout.com.