Textfi - simple blog tool written with Rails
Ruby HTML CSS JavaScript CoffeeScript
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
app
bin initial commit Jan 14, 2016
config Added root_path to title image. Mar 10, 2016
db
lib
log initial commit Jan 14, 2016
public
spec added Blogs controller. Feb 21, 2016
test Adding tests. Apr 3, 2016
vendor/assets added acts_as_taggable to Article. Feb 18, 2016
.gitignore Temporary added twitter embed api for blockquote. Feb 27, 2017
Gemfile updated rails version to 4.2.7.1 Feb 16, 2017
LICENSE Added LISENCE file. Feb 29, 2016
README.md Improvement of README. Mar 18, 2016
Rakefile initial commit Jan 14, 2016
config.ru initial commit Jan 14, 2016

README.md

Textfi

Textfi is simple blog tool written with Rails. current version works with Rails 4.2.

website http://textfi.com or https://github.com/yoosee/textfi

Installation

Initial install and Setup

First pull from github, then run bundle install. ruby and bundle should be installed.

% git clone https://github.com/yoosee/textfi.git
% cd textfi
% bundle install --path vendor/bundle --without development test

Setup Rails for production. It requires secret_key_base (config/secret.yml) which could be generated by following command.

% bundle exec rake secret

then setup environment value like below with the generated secret_key_base value.

export RAILS_ENV=production
export SECRET_KEY_BASE='<your_secret_key_base_here>'

Setup Database (Postgresql)

It's configured working with postgresql in Production. Please setup DB with table name 'textfi' and put configurations to environment values like below. For more details or customization, please see and edit config/database.yml.

export RAILS_PGSQL_USER=textfi
export RAILS_PGSQL_PASSWORD='<your_db_password_here>'

Run db:migrate when Databace configuration finished.

% rake db:migrate

Setup Web servers

Unicorn can be started by rake task which exists in lib/tasks/unicorn.rake. if you want to restart or stop, please replace 'start' with 'restart' or 'stop'.

% bundle exec rake unicorn:start

Setup Nginx or other HTTPD and connect it to Unicorn.

After the installation, access to http(s)://<your-base-url>/setup for registering first User and Blog, then login.

Basic Usage of writing Articles.

After logged in, click 'New Article' in 'Admin' dropdown to start writing an article. It will be visible from the internet when its status set to 'published'. Until then it'll be appeared in 'Drafts'.

Markdown

Article should be written in Markdown format. It supports PHP extention format of fenced_code_blocks, tables, etc.

Image upload and use in markdown

You can Drag & Drop image to the browser area for uploading images. When upload completed, you can see (id:N) on the image which can be used in markdown like ![Image Alt](id:N). You can review uploaded images from 'Media' link in dropdown menu.

Package dependencies

You need to install following applications/packages.

  • imagemagick - used by paperclip for converting image resize.
  • python-pygments - used by albino for colorizing code syntax.

External library dependencies (included in Gemfile and /vendor/assets)

Following libraries are used for the application. Those are already included or in Gemfile, no need to install individually.

  • paperclip - image uploader/handler in Rails.

  • Dropzone - Drag & Drop enabled image uploader.

  • acts-as-taggable-on - tag utility in Rails.

  • bootstrap-tagsinput - add Ajax capability to tag management.

Known issues (or Todo list)

  • There's no role & privilege control between User and Blog. It's all flat for now.
  • Several design components haven't yet been configurable (e.g. Blog image, CSS, HTML template, favicon.ico, etc.)
  • Blog distenguished by hostname, not baseurl itself.
  • Image size from Medium is not configurable.
  • Some JavaScript and CSS have loading issue (taggable, etc.)