Coder Social home page Coder Social logo

scanty's Introduction

Scanty, a really small blog

Overview

Scanty is blogging software. Software for my blog, to be exact: adam.blog.heroku.com

It is not a blogging engine, but it’s small and easy to modify, so it could be the starting point for your blog, too.

Features

  • Posts (shock!)

  • Tags

  • Markdown (via Maruku)

  • Ruby code syntax highlighting (via Syntax)

  • Atom feed

  • Comments via Disqus

  • Web framework = Sinatra

  • ORM = Sequel

Dependencies

$ gem install sinatra

Sequel, Maruku, and Syntax are all vendored.

Setup

Edit main.rb and change the Blog config struct at the top to your liking. For security purposes, change the admin password and the admin cookie key and value. These last two can be set to any random value you like, just choose something other than the default.

Then run the server:

$ ruby main.rb

And visit: localhost:4567

Log in with the password you selected, then click New Post. The rest should be self-explanatory.

In production, you’ll probably want to run “rake start” to start (and restart) the server. Change the value of “port” at the top of the Rakefile to run on a different port.

Database

The default is a SQLite file named blog.db. To use something else, set DATABASE_URL in your environment when running the app, i.e.:

$ DATABASE_URL='mysql://localhost/myblog' ruby main.rb

Or, modify the Sequel.connect statement at the top of main.rb.

The database will be created automatically when the server is executed.

Comments

There are no comments by default. If you wish to activate comments, create an account and a website on Disqus (disqus.com) and enter the website shortname as the :disqus_shortname value in the Blog config struct.

Import data

Christopher Swenson has a Wordpress importer: github.com/swenson/scanty_wordpress_import

Other kinds of data can be imported easily, take a look at the rake task :import for an example of loading from a YAML file with field names that match the database schema.

Customize

There are no themes or settings beyond the basic ones in the Blog struct. Just edit the CSS or the code as you see fit.

Meta

Written by Adam Wiggins

Patches contributed by: Christopher Swenson, S. Brent Faulkner, and Stephen Eley

Released under the MIT License: www.opensource.org/licenses/mit-license.php

github.com/adamwiggins/scanty

adam.blog.heroku.com

scanty's People

Contributors

sfeley avatar

Watchers

James Cloos avatar  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.