GithubHelp home page GithubHelp logo

avelino / liquidluck Goto Github PK

View Code? Open in Web Editor NEW
334.0 19.0 52.0 1013 KB

Felix Felicis (aka liquidluck) is a static blog generator in python

Makefile 0.35% Python 67.83% JavaScript 21.92% CSS 4.20% HTML 5.71%

liquidluck's Introduction

Felix Felicis

image

Felix Felicis (aka liquidluck) is a simple lightweight static blog generator written in Python.

There are so many static blog generators, why create a new one?

The main design pattern of Felix Felicis:

  1. Beautiful is better than ugly.
  2. Nothing is better than everything.

Documentation is available on RTD.

Commands

  1. Create a site:

    liquidluck init
  2. Search for a theme:

    liquidluck search
  3. Install a theme:

    liquidluck install moment
  4. Build articles:

    liquidluck build
  5. Preview server:

    liquidluck server

More information with liquidluck help.

Write a post

A post in markdown:

# Hello World

- date: 2012-06-11
- tags: python, javascript

-------

Hello World in Python

```python
def hello(name="World"):
    print "Hello %s" % name
```

Hello World in JavaScript

```javascript
function hello(name) {
    alert('Hello ' + name);
}
```

A post in restructuredText:

Hello World
============

:date: 2012-06-11
:tags: python, javascript

Hello World in Python::

    def hello(name="World"):
        print "Hello %s" % name

Hello World in JavaScript:

.. sourcecode:: javascript

    function hello(name) {
        alert('Hello ' + name);
    }

Both of these two posts are valid in their markup language, even without Felix Felicis they should be displayed well.

And in this case, your documents will always be yours, not tied to Felix Felicis.

Features

  • Category, Tag, Post, Page, Feed and everything a blog should have
  • Beautiful and valid syntax supports
  • Full customizable theme supports
  • Global theme gallery, site theme gallery, site template
  • No extension system (Is this a feature? YES!)
  • GitHub and BitBucket web hook service
  • Live preview server

Compatibility

liquidluck's People

Contributors

alex avatar alexwlchan avatar avelino avatar francistm avatar kadefor avatar keyvec avatar lepture avatar markroxor avatar microjo avatar msabramo avatar tshepang avatar untitaker avatar vivekagr 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

liquidluck's Issues

index.js

create a index.js that contains everything.

中文段落的处理问题

如果两个中文段落中间没有空行,那么这两段会被处理成为一段,换行符被处理成为了空格,能否不产生这个空格?

在 Emacs 中,由于 Emacs 会把一个段落处理为 80 字符的宽度,就会增加很多换行符,这些换行符最终被处理为空格,影响排版。

folder name cannot be chinese

I have tried liquidluck on Ubuntu 10.10 (zh_CN.utf8), but when generate html by format=post.folder/post.slug, it will throw an error, about can't encode ascii chars.

my python skill is poor, so cannot give more information about this issue >_<

集成 nico 现在的功能

  1. nico 项目改造成 liquidluck 的 theme

  2. liquidluck 支持在当前目录生成文档

    | - docs
         | - file.md
         ` - file.html
    | - README.md
    ` - index.html
    
  3. nico 中添加 velocity 代码高亮的支持

  4. 最后使用安装

    easy_install liquidluck
    liquidluck install nico -g
    mkdir overlay
    cd overlay
    liquidluck create
    liquidluck build
    

is 'settings.py' filename actually deprecated?

I get this message when running liquidluck build:

[W 121103 22:08:03 base:194] settings.py in theme is deprecated since 3.4
[W 121103 22:08:03 base:195] the name should be changed to theme.py

But I see the valid filenames (in liquidluck/generator.py) to be

config = [
        'settings.yml', 'settings.json', 'settings.yaml', 'settings.py',
 ]

Am I missing something?

server for github service hook

daemon server

$ liquidluck server -p 8888

add web hook url at github or bitbucket:

http://your_ip:8888

when git push finished, the daemon server will update the blog itself.

use file mtime for date if post does not have one set

Currently, posts without a date tag are ignored. Can you rather put the mtime date on the generated files. I would love this feature because I have many 'live' posts, where a date is irrelevant, and these are posts I would also avoid having to recognize as 'pages'.

Theme

theme support.

_themes/
   default/
       templates/
       static/

Unicode error when running liquidluck search

Hi there,

When I try to run liquidluck search I get the following output

Liquidluck version is 3.4 with basic installation nothing additional

(akihiro)ninja akihiro: liquidluck search
Enable Livereload Server by installing tornado
Traceback (most recent call last):
  File "/Users/sultan/.virtualenvs/akihiro/bin/liquidluck", line 8, in <module>
    load_entry_point('liquidluck==3.4', 'console_scripts', 'liquidluck')()
  File "/Users/sultan/.virtualenvs/akihiro/lib/python2.7/site-packages/liquidluck/cli.py", line 156, in main
    theme.search(arg_theme, arg_clean, arg_force)
  File "/Users/sultan/.virtualenvs/akihiro/lib/python2.7/site-packages/liquidluck/tools/theme.py", line 71, in search
    themes = __load_themes()
  File "/Users/sultan/.virtualenvs/akihiro/lib/python2.7/site-packages/liquidluck/tools/theme.py", line 50, in __load_themes
    f.write(content)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1467-1468: ordinal not in range(128)

主题的 theme.py 使用中文字符串问题

在主题的目录下面有 theme.py 这个文件,如果需要表示中文的字符串,比如:

navigation = [
    {'title': '首页', 'link': '/'},
    {'title': '关于', 'link': '/about.html'},
]

theme.py 保存为 utf-8 格式。在生成整个站点会出现如下错误:

[E 121109 19:23:23 base:42] 'ascii' codec can't decode byte 0xb9 in position 0:
ordinal not in range(128)
Traceback (most recent call last):
  File "d:\python27\scripts\liquidluck-script.py", line 9, in <module>
    load_entry_point('liquidluck==3.5', 'console_scripts', 'liquidluck')()
  File "D:\Python27\lib\site-packages\liquidluck-3.5-py2.7.egg\liquidluck\cli.py
", line 137, in main
    generator.build(arg_settings)
  File "D:\Python27\lib\site-packages\liquidluck-3.5-py2.7.egg\liquidluck\genera
tor.py", line 142, in build
    write_posts()
  File "D:\Python27\lib\site-packages\liquidluck-3.5-py2.7.egg\liquidluck\genera
tor.py", line 136, in write_posts
    writer.run()
  File "D:\Python27\lib\site-packages\liquidluck-3.5-py2.7.egg\liquidluck\writer
s\base.py", line 44, in run
    raise e
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb9 in position 0: ordinal
not in range(128)

系统是在 win7 下面。

ignores 'source' setting

When I change 'source' setting in settings.py to something else, the setting is ignore, and liquidluck continues using 'content' as directory.

Site name in settings.py

My site name is ThCode's Blog. In settings.py 'name': 'ThCode's Blog' causes an syntax error.

Maybe "name": "ThCode's Blog" is better.

更详细的错误信息输出

在测试 theme 的时候抛出:

[I 120720 11:41:06 base:45] CategoryWriter Finished [E 120720 11:41:06 base:42] tag name expected

应该是模板的问题,但能够将 jinja2 的错误信息也显示出来吗?

或者能提供更详细的错误信息?

GitHub Pages 不支持 {{filename}}/

生成的都是 {{filename}}.html

能不能将最后有 slash 的当作文件夹来生成?

即:

{{filename}}/index.html

那就不用在 server side 来改了。

The "<br>" in code block

In Markdown

Code:

```
brew install git
```

These code will be converted into:

<div class="code">
<div class="highlight">
<pre>brew install git<br></pre>
</div>
<br>
</div>

http://d.pr/8rX1

There are two <br> in the code block. Is this a bug or feature?

theme.py non-ascii error

[E 120929 01:06:01 base:42] 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/local/bin/liquidluck", line 8, in <module>
    load_entry_point('liquidluck==3.4', 'console_scripts', 'liquidluck')()
  File "/Library/Python/2.7/site-packages/liquidluck/cli.py", line 137, in main
    generator.build(arg_settings)
  File "/Library/Python/2.7/site-packages/liquidluck/generator.py", line 139, in build
    write_posts()
  File "/Library/Python/2.7/site-packages/liquidluck/generator.py", line 133, in write_posts
    writer.run()
  File "/Library/Python/2.7/site-packages/liquidluck/writers/base.py", line 44, in run
    raise e
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)

suggestion for handling of unspecified category

if category is not given in a post, it should automatically added, and should match parent directory name of that post. Would be kool if this was not default, so as not to mess setup for users who have no need for categories.

building docs fails

after navigating to docs directory...

$ make html
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.1.3
loading pickled environment... done

Theme error:
no theme named 'flask' found (missing theme.conf?)
make: *** [html] Error 1

error in interpreting what is content

If one has more than one ------ in a post, only the very last part after that sequence of characters gets interpreted as post content. It would be more correct if any such sequence, after the first (which splits metadata from content) be interpreted as <hr /> tag.

structure of setting file

in yaml:

site:
    name: Just lepture
    url: http://lepture.com

config:
    source: content
    output: deploy
    static: deploy/static
    static_prefix: /static/
    permalink: "{{category}}/{{filename}}.html"
    relative_url: false
    timezone: +08:00

author:
    default: admin
    vars:
        admin:
            fullname: Web Master
            email: [email protected]
        lepture:
            fullname: Hsiaoming Yang
            website: [email protected]


theme:
    active:
        - moment
        - bootstrap
    vars:
        navigation:
            -
                title: About
                url: /about
            -
                title: Resume
                url: /resume

writer:
    active:
        - liquidluck.writers.core.PostWriter
        - liquidluck.writers.core.ArchiveWriter
    vars:

reader:
    active:
        - liquidluck.readers.markdown.MarkdownReader
    vars:

How to use first_paragraph filter

I've followd the instuction to add following lines to config.ini.

[filters]
first_paragraph = liquidluck.filters.first_paragraph

but it's not working at all.

修改配置文件读取顺序

配置文件的读取顺序

  1. 先读当前项目的 setting
  2. 读取 ~/.liquidluck-themes/arale/ 下的 setting
  3. 读取默认的 setting

theme 切换功能

可以指定当前要使用某个 theme,build 的时候会使用这个 theme 的配置文件。

liquidluck install arale

rst is optional

people love markdown, they want to install less lib. make rst optional.

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.