Skip to content

Latest commit

 

History

History
88 lines (65 loc) · 3.65 KB

README.textile

File metadata and controls

88 lines (65 loc) · 3.65 KB

Python Blog for Google App Engine, heavily tweaked from Bill Katz’ Bloog

Instructions

Once you’ve checked out the code, initialize the external git modules, and
download some other external dependencies like so:

 $ git submodule init
 $ dev/yui-install.sh
 $ dev/gdata-install.sh

Minified Resources

My fork of Bloog uses minified JS and CSS resources when hosted online, but un-
minified versions when run locally. This allows you to make quick changes
during development (and get accurate line numbers when debugging) while still
serving content as quickly as possible to your visitors. However, this means
if you make changes to JS or CSS files, you must run dev/minify.sh before
uploading your application via appcfg.py update.

Locally Hosted Resources during Development

Sometimes I’m offline when doing development so YUI resources are served locally
during development (i.e. when debug mode is turned on), but those files are
served from Yahoo’s CDN when the app is hosted live. Run dev/yui-install.sh
which will download the YUI dependencies to the static/hosted folder. These
files are not uploaded to the AppEngine servers, since they are not used when
the app is live.

Picasa Image Store

There are two modes for uploading images to your blog – local image storage, and
hosting from Picasa. If you want to host your images on Picasa (to save on data
API costs) you need to also download the gdata API and supporting libraries.
To download these dependencies, run dev/gdata-install.sh from your bloog
base directory. The script will download and extract the necessary files into
your bloog project.

Next, you need to determine what album you want to upload images to. Picasa can
automatically use an album named ‘default.’ However, if you want to use some
other Picasa album that you’ve created, you need to determine that album’s ID.
Edit and run dev/scripts/picasa_get_album_id.py (inserting your user name and
the name of the album you’ve created). The script will spit out that album’s
ID, and also list the photos already present in that album (as a sanity check to
make sure that album is publicly accessible). Then take that album ID number
and put it in the picasa_auth section of config.py.

Deploying to AppEngine

Change the application name in app.yaml, and upload your app. If you happened
to modify any of the javascript or CSS resources, minify them first:

 $ dev/minify.sh
 $ appcfg.py update .

For more information on AppEngine, see the Getting Started documentation .

Changelog

Quick list of changes I’ve made from Katz’ original code:

  • Recaptcha integration for comments
  • Picasa image upload
  • Local image upload and hosting
  • Improved memcache lookup to reduce datastore access
  • Google Analytics support
  • Use minified JS and CSS resources in hosted mode
  • Summary and full-content Atom feeds
  • Added Tag cloud
  • Admin may delete comments from article view
  • Editor tweaks:
    • View/edit raw HTML in posts
    • Inline code tag as well as <pre> blocks
    • Admin’s name and email are inserted by default for comment replies
    • Comment subject defaults to “Re: <parent subject>”
    • Configurable post date & legacy ID if manually uploading old posts.
  • Blogger legacy URL mapping support
  • Commenter names link to their homepage
  • Upgrated Syntaxhighlighter to hosted version
  • Configurable YUI version

Final Notes

The image upload feature uses an icon from FamFamFam’s Silk icon set.