An article is a folder with a markdown document named
When an article is requested, it is rendered as html with the layout, and
cached. Cache expiration is based on file modification timestamps.
The canonical permalink format is:
This will be matched against possible post paths. If a post cannot be found, a 404 will be shown.
Legacy urls are 301 redirected by DeprecatedRoutes middleware.
Post assets served from
There are utility rake tasks to manage posts and publishing:
rake util:crawl # list all urls in site with status and referer
git clone https://github.com/jch/whatcodecraves.com bundle cp config/env.sample .env # customize this rake yard foreman start
Reference documentation can be found at http://rubydoc.info/github/jch/whatcodecraves.com.
Staging lives on heroku.
rake deploy # runs everything under `deploy` rake deploy:warmup # warm up Rack::Cache by crawling the site rake deploy:sitemap # generate a sitemap
Apache Passenger configuration on VPS:
# /etc/apache2/conf.d/passenger LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.13/ext/apache2/mod_passenger.so PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.13 PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p180/ruby
sudo service apache2 restart
- server-side syntax highlighting - done clientside w/ js right now
- code overflow scroll
- helpers for linking to other posts
- gemify to separate code from content
- custom heroku buildpack