# Blug #
*Because "I just blogged about it" is too difficult to say*
## Intro ##
Blug is a static site generator for Markdown based blogs. It currently
uses the Octopress based theme from www.jeffknupp.com, but this will change shortly.
While Blug generates static pages, the ultimate purpose of Blug is to run as a standalone process capable of 'psuedo-dynamic' site
interaction. Today's blogs are static, so much so that static blog generation tools have become the new 'Create a Twitter Clone'
for tutorials topics. I envision Blug as an intelligent agent, a daemon able to dynamically regenerate
your site and insert content when triggered by external events. Stuff like dynamically re-generating a post to include a link
to comments on your post on HackerNews or reddit when Blug sees this event has occurred. Or re-generating to scale back the included css/javascript when Blug sees your webserver is getting hammered. These are the kinds of things I'm interested in exploring.
## Installation ##
Blug currently requires no installation, though running ```python setup.py install```
will create 'install' the blug.py script. You can also get it from pip using ```pip install blug```.
## Usage ##
Edit the ```config.yaml``` file with values appropriate for your site. They should be pretty self-explanatory.
Once done, place your posts in a directory called ```content``` (this is the default location Blug checks for
posts). Each post follows the Octopress/Jekyll naming convention for posts: year-month-day-title-of-post-as-slug.
Once you've got everything set up, there are three components to the ```blug.py``` script.
### Creating a New Post ###
```python blug.py post 'How Javascript is Ruining a Generation of Programmers' ``` This will create a new post
in your ```content``` directory with the appropriate filename and yaml front matter.
### Generating the Site ###
```python blug.py generate``` This **deletes and regenerates the current generated content**. Run this whenever you
make a change to a post or after finishing a new one. The output in the ```generated``` directory is the complete site.
### Viewing Your Site Locally ###
```python blug.py serve <port> <host> <path>``` This starts a webserver locally to allow you to preview your site. Use
```generated``` as the ```path``` argument to serve files using your generated site as the root.
## Coming Soon ##
A number of features have either been committed or are in the process of being committed
* **Live Mardown Post Editing**- Start up the included webserver and navigate to host:port/create to
create a new post with live Markdown translation. In the left pane you enter normal Markdown test. The right
pane is updated with the translated HTML in real time. No more regenerating your entire site just to see if you
remembered how to do a nested list in Markdown.
* **Git(hub)/Dropbox Integration**- Automatically deploy new posts and changes to your blog on the back of commits
to your local git repository, commit to Github, or Dropbox file uploads
* **The Blug Server**- The real reason I created Blug. Stay tuned.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共42个文件
js:11个
png:10个
py:6个
资源分类:Python库 所属语言:Python 资源全名:blug-0.2.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
blug-0.2.0.tar.gz (42个子文件)
blug-0.2.0
PKG-INFO 1KB
README.txt 3KB
templates
head.html 3KB
category_feed.xml 1019B
index.html 765B
base.html 7KB
post.html 2KB
atom.xml 751B
about.html 5KB
archives.html 704B
test
test_blug.py 943B
__init__.py 0B
blug.py 11KB
static
images
rss.png 490B
search.png 333B
bird_32_gray_fail.png 615B
noise.png 17KB
line-tile.png 636B
code_bg.png 239B
dotted-border.png 99B
email.png 301B
bird_32_gray.png 1KB
untitled.png 18KB
javascripts
pinboard.js 2KB
showdown.js 34KB
octopress.js 9KB
showdown-gui.js 9KB
github.js 1KB
twitter.js 3KB
ender.js 30KB
modernizr-2.0.js 10KB
libs
swfobject-dynamic.js 10KB
ender.js 41KB
jXHR.js 2KB
stylesheets
screen.css 44KB
style.css 4KB
atom.xml 956B
config.yml 950B
requirements.txt 55B
setup.py 2KB
lib
http.py 4KB
__init__.py 0B
共 42 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功