wiki:FullBlogPlugin

Add a self-contained blog to Trac

Description

This plugin provides the ability to maintain a project blog. It is a production-ready release, supporting Trac 0.11-1.4 installations. The plugin does not yet support other locales than English, ie there is no l10n/i18n support.

Key features:

  • Create, edit and view blog posts under a new 'Blog' menu.
  • Browse post by month, category and author and Archive page for all posts.
  • Attachments on blog posts.
  • Comments for blog posts.
  • Posts and comments appear in Timeline / RSS + separate post comments feed.
  • Search for blog posts and comments.
  • Admin page for basic settings and editing informational text in sidebar.
  • Permissions for BLOG_VIEW, BLOG_COMMENT, BLOG_MODIFY_OWN, BLOG_MODIFY_ALL, BLOG_CREATE, BLOG_ADMIN.
  • Support for Trac fine-grained permissions security checks (based on resource / realm).
  • Special handling of a post named 'about'.
  • Area in sidebar for information text, blogroll, links and similar.
  • TracLink provider. Examples: [blog:this_is_my_post], [blog:category/trac], [blog:2007/10].
  • Delete post version, delete post and delete comment.
  • A tags provider for TagsPlugin if plugin is available.
  • A [[BlogList]] news-listing macro with various display modes for pulling blog posts into the wiki.
  • Change listener and manipulator APIs for hooking on to changes.
  • Sample plugin that implements blog post 'draft' functionality: BlogDraftPlugin.py.

Some planned features:

Feedback is most welcome, see osimons to get in touch with me by mail or on the #trac channel.

Macro

A macro to display list of posts and extracts outside (or inside) the Blog module, most commonly Wiki pages.

All arguments are optional:

[[BlogList]]

Available named arguments:

  • recent= - maximum number of posts
  • category= - a category
  • author= - an author
  • period= - time period of the format YYYY/MM
  • heading= - a heading for the list
  • format= - type of display (see below for details)
  • max_size= - maximum number of characters to render for each post

Example showing some available named arguments:

[[BlogList(recent=5, max_size=250, period=2017/12, author=osimons, format=float, heading=Some Trac Posts)]]

The arguments for criteria are 'AND'-based, so the above example will render at most 5 posts by 'osimons' in December 2017.

There is no heading unless specified.

Without restriction on recent number of posts, it will use the number currently active in the Blog module as default for 'float' and 'full' rendering. For rendering of 'inline' list it will render all found as default unless restricted. Additionally for 'float' and 'full' it will truncate content if it is larger than a max_size (if set).

The format= keyword argument supports rendering these formats:

format=inlineRenders an unordered list in the normal text flow (default).
format=floatA floating box out on the side of the page with slightly more detail.
format=fullFull rendering like on period, category and author listings inside blog.

The arguments can appear in any order.

Posts are rendered sorted by newest first for all modes.

An old-ish screenshot, showing the posting view with commenting:

A screenshot of FullBlogPlugin post view with commenting.

To see the blog in action, visit its home at http://www.coderesort.com/about/blog.

Migration

There is a script available in the contrib directory for migrating existing TracBlogPlugin users to the FullBlogPlugin.

To use it:

  • Install TagsPlugin 0.6
  • Install FullBlogPlugin, see #Installation instructions below
  • Upgrade the Trac environment:
    $ trac-admin /path/to/env upgrade
    
  • Run the migration script:
    $ migrate-tracblog.py /path/to/environment
    
  • Confirm that the migration succeeded, then remove the old posts if desired:
    $ migrate-tracblog.py /path/to/environment --delete-only
    

Take a look at migrate-tracblog.py --help for more options.

Other related plugins

Bugs/Feature Requests

Existing bugs and feature requests for FullBlogPlugin are here.

If you have any issues, create a new ticket.

defect

61 / 62

enhancement

53 / 74

task

6 / 6

Download

Download the zipped source from here.

Source

You can check out FullBlogPlugin from here using Subversion, or browse the source with Trac.

The plugin is also available on PyPI.

Installation

Either:

  • To install it directly from repository to get the latest version with revision marker, use pip install:
    $ pip install svn+https://trac-hacks.org/svn/fullblogplugin/1.4
    
  • Or, check out the source and similarly run python setup.py install at the correct location. To update the plugin later, you can then just do svn up to pull down the latest source from repository and install it again.
  • For older versions of Trac, say 0.11, download and unzip the file, and cd into the directory with correct version. Then run python setup.py install.

Configuration

After installation, follow these steps and configuration hints:

  1. Enable the plugin in your trac.ini file:
    [components]
    tracfullblog.* = enabled
    
  2. Upgrade your Trac environment by running: trac-admin /path/to/env upgrade.
  3. Restart server and as TRAC-ADMIN you should now see 'Blog' in menu.
  4. Add one or more permissions to let users view, create, comment and modify posts, see list above.

The menu item 'Blog' in the menu bar will appear last. To move it, edit your trac.ini file to add blog into the ordered list:

[trac]
mainnav = wiki,blog,timeline,....

If you would like the blog to be the new default home page for your project (ie handle requests to /myproject/), then update trac.ini:

[trac]
default_handler = FullBlogModule

Recent Changes

18216 by rjollos on 2021-04-13 16:25:30
FullBlogPlugin: Bump version after release

Version 0.2.0 has been published to PyPI.

Refs #13999.

18215 by Cinc-th on 2021-04-13 06:23:23
FullBlogPlugin: reverted the recent version change in [18204] because it clashes with proper release management.
18207 by Cinc-th on 2021-04-12 18:29:02
FullBlogPlugin: rearranged the contents of the side bar. New handling of About post link in the sidebar. See comment:4:ticket:13971.

Refs #13971

(more)

Author/Contributors

Author: osimons
Maintainer: osimons
Contributors:

Last modified 3 years ago Last modified on May 14, 2021, 8:06:02 AM

Attachments (1)

Download all attachments as: .zip