Giter Club home page Giter Club logo

dangolino's Introduction

Just my simple blog engine


it's my static site generator written in Ruby.


How it works

First, you need to create 3 templates:

  • index.mustache
  • all_posts.mustache
  • post.mustache

index.mustache will be parsed to be your homepage, post.mustache will be parsed to each post to your site and all_posts.mustache will be parsed to create an post listing.

Every new post, must be written in HTML or Markdown and after it'll be parsed and your new post will be generated to a plain HTML file.

Just like that:

cd bin
ruby dangolino.rb --year 2012 --month 09 --file /home/adler/posts/my_new_post.md --link my-new-post --title "My new Post" --format markdown

If you want to parse from HTML files, you can ommit --format parameter.

The comand above will generate the new files and create new all_posts.html and index.html files.

Configuration file

For configure your site, you will need to create an yaml file like this one located at: dangolino_dir/lib/dangolino/config/settings.yml

---
path:
    root_dir: /Users/adler/Dropbox/dangolino
    generate_dir: /Users/adler/Dropbox/dangolino/site
    template_dir: /Users/adler/Dropbox/dangolino/templates
    lib_dir: /Users/adler/Dropbox/dangolino/lib
    datafile: /Users/adler/Dropbox/dangolino/lib/dangolino/data/post_listing
    url: http://yoursite.com
mysql:
    host: 127.0.0.1
    user: root
    pass: ""
    dbname: blog_adler

Import from Wordpress

You can import from wordpress filling database data on settings.yml above and running:

cd bin/
ruby dangolino-import.rb

To-do list

  • Create an database backend instead of a flat file
  • Improve multi-site support
  • Support Less

Notice

It's open-source, BSD-like licensed and you can use without restrictions, but, at your own risk.

And...

I did it for myself, i use this on my personal website: http://adlermedrado.com.br.

It works fine for me, but it doesn't means that it will work fine for you.

endorse

dangolino's People

Contributors

adlermedrado avatar

Watchers

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