GithubHelp home page GithubHelp logo

whatcodecraves.com's Introduction

whatcodecraves.com

Build Status

This is the content and Rails app that serves whatcodecraves.com. Articles are written in markdown and stored in the articles folder.

Overview

An article is a folder with a markdown document named index.text. When an article is requested, it is rendered as html with the layout, and cached. Cache expiration is based on file modification timestamps.

Permalinks

The canonical permalink format is:

/articles/YYYY/MM/DD/some-dasherized-title

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.

Assets

Post assets served from public.

Usage

There are utility rake tasks to manage posts and publishing:

rake articles:new      # write a new draft
rake articles:pending  # see pending unpublished drafts

rake util:crawl        # list all urls in site with status and referer

Development

git clone https://github.com/jch/whatcodecraves.com
bundle
cp config/env.sample .env  # customize this
rake
yard
foreman start

Documentation

Reference documentation can be found at http://rubydoc.info/github/jch/whatcodecraves.com.

Deployment

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

To reload:

sudo service apache2 restart

TODO

  • server-side syntax highlighting - done clientside w/ js right now
  • code overflow scroll
  • helpers for linking to other articles
  • gemify to separate code from content
  • custom heroku buildpack

whatcodecraves.com's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.