Giter Club home page Giter Club logo

rux's Introduction

Rux

Micro & Fast static blog generator (markdown => html).

latest version: v0.6.6-Beta

Features

  • Static: Markdown => HTML

  • Not tags, No categories, No feed generation, No ...

  • Minimal & Simple configuration

  • Ability to run in the background as a daemon

  • Ability to save posts in PDF for offline reading

  • Ability to build automatically once source updated

Installation

$ mkdir MyBlog
$ cd MyBlog
$ virtualenv venv
New python executable in venv/bin/python
Installing setuptools............done.
Installing pip...............done.
$ . venv/bin/activate
$ pip install rux

Install troubles: https://github.com/hit9/rux#common-issues

Demo

QuickStart

  1. Create a new directory and install rux:

    mkdir myblog && cd myblog
    virtualenv venv
    . venv/bin/activate
    pip install rux

    Deploy blog inside it:

    mkdir blog && cd blog
    rux deploy
  2. Edit generated configuration:

    vi config.toml
  3. Start rux daemon:

    rux start
  4. New a post:

    rux post
  5. Preview site in browser, default url: 0.0.0.0:8888.

Sample Post

Sample post:

Hello World
http://titlepic.jpg
---
**Hello World**

A post is separated into head and body by ---.

Head includes title (required) and title picture (optional), body is in markdown.

Commands

To deploy a new blog in new-created directory:

rux deploy

To build site from source to htmls:

rux build

To create a new post:

rux post

To remove all htmls rux built:

rux clean

To start a HTTP server and watch source changes:

rux serve

When you save your writings, rux can detect the changes and start rebuilding.

To run rux's server and rebuilder in the background(so we can write blog with at most one shell session.):

rux start

To generate all posts to pdf:

rux pdf

Themes

You really should manage your theme in a standalone git repository, and use it as a submodule of your blog's submodule if your blog is under git versioning too.

For instance, add theme default a submodule of your blog's repo:

$ git submodule add git://github.com/hit9/rux-theme-default.git default

If you want to modify a theme created by someone else, just fork his(or her) repo, and then modify it.

But it's 100% ok to use themes not in the submodule way.

Theme list:

Common Issues

  1. Installation troubles on Ubuntu: cann't find Python.h, solution:
sudo apt-get install python-dev
  1. How to generate PDF from my blog? You need to install wkhtmltopdf first:

License

BSD. Rux can be used, modified for any purpose.

rux's People

Contributors

hit9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rux's Issues

ruxlibparser.parse failed?

My .md file:

New Journey with Rux!
http://vlove.qiniudn.com/2013-09-28-21-15_0.jpg
---
Have a nice day.

But it seems that there are some problems in this line

    rt = libparser.parse(byref(post), src)
    return (
        rt,
        string_at(post.title, post.tsz),
        string_at(post.tpic, post.tpsz),
        post.body
    )

They are all wrong result. Such as rt is -1, title and body is None.

rux build失败

hi.

as3:# rux build
SUCCESS (17:34:43) Initialized
ERROR (17:34:43) Jinja2 template was not foundTemplate: 'post.html'
as3:
# pip install Jinja2
Requirement already satisfied (use --upgrade to upgrade): Jinja2 in /usr/local/lib/python2.7/site-packages
Cleaning up...
as3:~#

如何解决?

todo

  • 加上端口可选择
  • 添加根路径选项
  • wkhtmltopdf on osx

A few comments

Hi there. In relation to package requirements, you might like to read Donald Stufft's advice on setup.py vs requirements.txt. He's quite knowledgeable on the subject, being a maintainer for pip :)

Also had you considered using a YAML frontmatter for posts? (Or TOML, for that matter)

A lot of other blog generators, like Jekyll and Acrylamid, use this format, and if you chose to support it it would make your blog post format compatible and familiar with many other engines.

todo

  1. try except wkhtmltopdf command not found (IOError)
  2. output to out.pdf instead of title.pdf
  3. pep8 styled

cannot find ruxlibparser.so

Arch Linux.

command:

rux deploy <dirname>

In libparser.py,

dll_path = os.path.join(get_python_lib(), 'ruxlibparser.so')

OSError: <dir>/rux/venv/lib/python3.5/site-packages/ruxlibparser.so: cannot open shared object file: No such file or directory

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.