Gist simplicity can turn blogging into a liberating experience.
| Pros | Cons |
|---|---|
| ✅ Free, simple, fast, hassle-free | ❌ Image upload in comments only |
| ✅ Tagging | ❌ No post pinning |
| ✅ Search | ❌ Doesn't look like a blog |
| ✅ Revisions | ❌ Unfriendly URLs |
| import EXIF from 'exif-js'; | |
| const hasBlobConstructor = typeof (Blob) !== 'undefined' && (function checkBlobConstructor() { | |
| try { | |
| return Boolean(new Blob()); | |
| } catch (error) { | |
| return false; | |
| } | |
| }()); |
| /* | |
| * Steps | |
| * 1. Rename your gulpfile.js to gulpfile.babel.js | |
| * 2. Add babel to your package.json (npm install -D babel) | |
| * 3. Start writing ES6 in your gulpfile! | |
| */ | |
| import gulp from 'gulp'; // ES6 imports! | |
| import sass from 'gulp-sass'; | |
| # rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました | |
| # https://github.com/onk/onkcop | |
| inherit_gem: | |
| onkcop: "config/rubocop.yml" |
| test: | |
| pre: | |
| - "export PULL_REQUEST_ID=`bundle exec prid willnet/savanna` && if [ $PULL_REQUEST_ID ]; then cd .. && git clone [email protected]:willnet/savanna.git for_pronto && cd for_pronto && git checkout -b ${CIRCLE_BRANCH} remotes/origin/${CIRCLE_BRANCH} && bundle install && PULL_REQUEST_ID=`bundle exec prid willnet/savanna` bundle exec pronto run -c master -f github_pr && cd ../savanna; else echo 'current branch is not pull request'; fi" |
| 'use strict'; | |
| var React = require('react'), | |
| classSet = require('react/lib/cx'), | |
| _ = require('underscore'); | |
| var ClassNameMixin = { | |
| propTypes: { | |
| className: React.PropTypes.string, | |
| context: React.PropTypes.string |
| /** | |
| * @jsx React.DOM | |
| */ | |
| var React = require('react/addons'); | |
| /* the link component is used to navigate away from th current url. Some of it is app spesific and | |
| therefore not included here. */ | |
| var Link = require('../components/Link.jsx'); | |
| var cx = React.addons.classSet; |
| //gulp & plugins | |
| var gulp = require('gulp'); | |
| var gutil = require('gulp-util'); | |
| var jshint = require('gulp-jshint'); | |
| var browserify = require('gulp-browserify'); | |
| var jade = require('gulp-jade'); | |
| var stylus = require('gulp-stylus'); | |
| var mocha = require('gulp-mocha'); | |
| var nodemon = require('gulp-nodemon'); | |
| var livereload = require('gulp-livereload'); |
1個のVPSで複数のGhostを立ち上げる方法。といっても、下に書いてあるとおりなんですが…w
→ How To Serve Multiple Ghost Blogs on One VPS Using Nginx Server Blocks | DigitalOcean
Digital Oceanは、Ghostの入ったドロップレットが用意されているので、セットアップでそれを選べば1分でサイトは用意できます。Ghost側のconfig.jsとかちょいちょいっと修正すればあっという間に完成です。
でも、今のバージョンのGhostは1インストールで複数のブログを設置することができないので、複数のサイトを立ち上げたい時はサブドメインとかで分けてそれぞれを起動する必要があります。Digital OceanのGhostのドロップレットは「Ubuntu+nginx」なので、最初に任意のホストを登録した後に(Ghost動かしてからでもいいけど)nginxの設定を2つ分けてあげればオッケー。
| # db/migrate/XXXXXXXXXXXXX_add_authentication_token_to_users.rb | |
| class AddAuthenticationTokenToUsers < ActiveRecord::Migration | |
| def change | |
| add_column :users, :authentication_token, :string | |
| add_index :users, :authentication_token, :unique => true | |
| end | |
| end |