• Stars
    star
    158
  • Rank 229,512 (Top 5 %)
  • Language
    CSS
  • Created almost 12 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Because "I just blogged about it" is too difficult to say.

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

More Repositories

1

sandman

Sandman "makes things REST".
Python
2,315
star
2

sandman2

Automatically generate a RESTful API service for your legacy database. No code required!
Python
1,981
star
3

bull

Bull always charges!
Python
153
star
4

omega

The Last Python Web Framework
Python
71
star
5

domain-parser

Parse domains using the TLD list maintained by publicsuffix.org
Python
61
star
6

brokest

Broker-less Python Task Queue
Python
53
star
7

blog

Repo for jeffknupp.com content
Python
43
star
8

flask_sandboy

Sandman's little brother
Python
42
star
9

review

Code for project reviews
Python
38
star
10

adserver

A simple ad server in Go
Go
16
star
11

presser

letterpress AI bot
Python
10
star
12

eavesdropper

JavaScript
10
star
13

sprime

sandman prime
Python
9
star
14

dotfiles

Shell
8
star
15

kickstarter_video_two

Code for the second video in the Writing Idiomatic Python Video Series
Python
6
star
16

talks

Talks I've given/am working on
HTML
6
star
17

python-data-structures

4
star
18

kickstarter_video_three

Writing Idiomatic Python Video Three code
Python
4
star
19

monitord

Python
4
star
20

nosql

Toy NoSQL implementation for blog post
Python
4
star
21

docker

Shell
3
star
22

jeffknupp

Personal repo just for the wiki-ness
3
star
23

python-docs

New documentation for the Python language
Python
2
star
24

jeffknupp.github.com

pages review
2
star
25

tutor_toph

2
star
26

proxy

HTTP traffic inspection
2
star
27

af

source code search tool modeled after ack/ag
Go
2
star
28

real_sharps

CSS
1
star
29

betterback

JavaScript
1
star
30

tutor_john

CSS
1
star
31

browser

Go
1
star
32

sandman_new

Python
1
star
33

tutor_martin

1
star
34

edp

Python
1
star
35

json_resume

Resume
1
star
36

sprite

A super-lightweight HTTP server in Go
Go
1
star
37

writing-idiomatic-python

Changes and errors in "Writing Idiomatic Python"
1
star
38

execd

Platform for executing distributed jobs
1
star