blog.pngCreate and manage blog posts
Recommended
TypeXAR
Developed by

XWiki Development Team

Rating
Rate!
18 Votes
LicenseGNU Lesser General Public License 2.1
Installable with the Extension Manager

Description

Creating one or several Blogs

By default a recent XWiki installation will provide a blog inside the Blog space. 

Since 9.4 the multi-blog feature is supported, it provides the following options:

  • The initial set of categories located in the Blog space will be shared by all existing blogs.
  • New blog can be created anywhere on the wiki, including under nested documents.
  • By default a new set of categories is created for each newly created blog.
  • All panels of the blog application will display contextual information based on:
    • The displayed blog document, OR
    • The displayed category or set of categories
    • Newly created blog will be configured with a minimal set of panels like the initial Blog located in the Blog space.
In order to not break the old blog,(befor 9.4), use cases and to be able to aggregate posts of blogs using the same categories location we need to set the category property of the old blog posts to a default value when the post category is not set by the user.
Run the script available on the Blog.BlogPostsMigration page.

You can use the default blog (inside Blog space) or create a new one inside a new page using the Blog's Management. For that you just need to navigate to this URL: <URL to server:port>/xwiki/bin/view/Blog/Management. A new page will show up asking you to enter:

  • The title of the Blog
  • The location of the blog in the page hierarchy 
  • The blog categories location
  • Enable/Disable displaying blog panels
  • Check to create default categories (News, Personal, Other)
  • Select the layout of the blog posts (Calendar or Image)

newBlog.png
Create a new blog

After you have filled in the information click "Create". You now have a new blog!

Creating a new Blog Post

There are currently 2 ways of creating a blog post:

  1. By going to the Blog's homepage and using the "Create a new post" input where you enter the post title and hit the "Create" button:

    createBlogPostUI.png

  2. Or by using the standard + (create page) button from anywhere inside the Blog page (or one of its children) and by selecting Blog Post as your new page's type:

    blogPostTemplateProvider.png

Post image thumbnail

Since 9.4, an image thumbnail was added to blog posts in order to allow a more visual and appealing display of blogs posts and list of blog posts.
imageThumbnail.png
Blog post image thumbnail

Useful Macros

Since 9.4, Blog Post List macro, post layout macros and Blog Post Create Macro are available, these macros can be used to query and display blog posts anywhere on the wiki.

Blog Post List Macro

The Blog Post List Macro is used to query and display blog posts anywhere on the wiki, based on some parameters, the results can be displayed using customizable post layouts.

Usage

{{blogpostlist blog="Blog.WebHome" category="Blog.News" published="yes" layout="full" layoutParams="displayTitle=false" limit="10" /}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
blogyesa document reference The  descriptor document of a blog (It should contain a document with a Blog.BlogClass object)
categoryyesa document reference Either a given category or a category space (not mandatory, at least blog or category mandatory)
publishedyesyes, no, allyesLimit results to published posts
hiddenyesyes, no, allnoLimit results to hidden posts
fromDateyesstring date Limit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd.
toDateyesstring date Limit posts to posts published before a given date. The format of the date is yyyy-mm-dd.
limityesinteger10Number of posts to display
layoutyeslink,full,imagelinkThe name of the post layout macro that will be used to display the posts. The naming convention for the layout macros is: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
layoutParamsyesstring Additional parameters of the blog post layout
paginatedyesyes,noif the limit parameter is not provided the itemsPerPage is extracted from the blog descriptorUsed to enble/disable the pagination of the the blogPostList macro results

Blog Post Layout Macros

Blog post layouts are wiki macros created in order to customize the layout of blog posts. Currently 3 blog post layout macros are available: blogPostLayoutLink, blogPostLayoutFull and blogPostLayoutImage.

Usage

{{blogPostLayoutFull reference="Blog.MyFirstPost" params="displayTitle=true|useSummary=true"}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
referencenoa document reference The document reference of the blog post
paramsyesstring Additional parameters of the blog post layout

Examples of post layouts

linkPostLayout.png
The link post layout(BlogPostLayoutLink macro)

fullPostLayout.png
The full (default) post layout(BlogPostLayoutFull macro)

imagePostLayout.png
The image post layout(BlogPostLayoutImage macro)

How to configure a new blog post layout?

  • Create the blog post layout using this naming convention: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
    eg: SomePage.BlogPostLayoutMyLayout
  • Configure a given blog to use the new layout
    • Edit the Blog.BlogClass, and for the field postsLayout, add the new layout name to the static list (|myLayout=My layout)
    • Edit the descriptor of your blog, and in the BlogClass object, change the layout to the new one.

Blog Post Create Macro

The Blog Post Create macro is used to insert a post creation form anywhere on the wiki. The macro takes a blog descriptor document as parameter. The new blog posts will belongs to the blog specified in the parameter.

blogPostCreate.png
The blog post create macro

RSS Feed for the Blog

In order to display the RSS Feed icon on your blog you have to add this line:

<link rel="alternate" type="application/rss+xml" title="Blog RSS Feed" href="$xwiki.getURL('Blog.BlogRss', 'view', 'xpage=plain')" />

to the Blog's Presentation HTTP Meta Information text area. You can reach that by clicking on Administration -> Administer Space: 'Blog Space Name' -> Page Elements.

If you want to provide feeds based on the Blog's Categories then drag the Blog Categories Panel onto your blog's sidebar. You can find that by selecting Administration -> Administer Space: 'Blog Space Name' -> Panel Wizard.

Examples

The blog application is used for example on the Blog page of xwiki.org.

It is also possible to customize the Blog application for specific purposes. You will need some Velocity knowledge to do this, so please check the Developer's Guide for more information.

You can add / change blog categories on the http://<server>/xwiki/bin/view/Blog/ManageCategories page. 

A panel that lists all blog categories is also available. You can find it on the http://<server>/xwiki/bin/view/Blog/CategoriesPanel page of your XWiki.

Screenshots

BlogPanel.png
The Blog Categories Panel

BlogArticle.png
A Blog Article

XWikiBlog.png
A Blog Main Page

Since 9.4, Blogs panel is proposed to display all blogs sharing a same set of categories

blogsPanel.png
Blogs panel

Notifications

Since 9.2, users can observe the Blog Application in their notifications preferences:

NotificationSettings.png

Then, when a blog post is published, a notification is displayed on the top menu.

Notification.png

Changing the Style

The blog application uses a Skin Extension stored as an object attached to the Blog.BlogStyle document. In order to modify the Blog's style edit this document in Object Mode and modify the style as you wish.

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
9.1.2XWiki Enterprise 9.1.2

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v9.5.1

  • Closed BLOG-100 Blogpost "Content" is not displayed on Blog homepage when creating/editing blogposts with Firefox and Summary is empty

v9.5

  • Closed BLOG-97 Add a "Manage Blogs" link in the "All Blogs" panel
  • Closed BLOG-95 No way to navigate to new Blog from the Blog app home page
  • Closed BLOG-94 Blog.BlogPostLayoutMacros should be hidden
  • Closed BLOG-93 Editing the blog home page shows a deprecated xproperty
  • Closed BLOG-92 Don't display the ability to uploaded images in Blog post if feature is not enabled
  • Closed BLOG-90 Migrate application-blog-notifications into wiki pages

v9.4

  • Closed BLOG-89 Broken integration test since the separation of the notification module
  • Closed BLOG-88 Categories with quotes are not correctly rendered on the post footer.
  • Closed BLOG-87 Fail to display notifications on XWiki 9.4-rc-1
  • Closed BLOG-83 The blog management page should propose all layout available in the BlogClass
  • Closed BLOG-82 leftover work on the multi-blog feature
  • Closed BLOG-77 Creating a category and selecting it while creating a blog post doesn't keep that category selected after Save & View
  • Closed BLOG-74 User that had no rights on a blog (old blog) before changing to the new type of blog has many Red messages in the Blog now, also same issue appears when the user has Deny on a blog (Deny given with the new app to a blog already created)
  • Closed BLOG-73 BlogPostCreate and Blog post list macros have Eng misspelling/missing words
  • Closed BLOG-72 Can't access the Blog.CategoriesSheet
  • Closed BLOG-70 Right Navigation bar appears in All categories of a blog that doesn't have any posts created yet
  • Closed BLOG-68 Blogs panel should not display a single entry
  • Closed BLOG-66 Code appears when editing a blog
  • Closed BLOG-65 HTML code appears in the right panel when creating a new blog post
  • Closed BLOG-63 RSS for All categories doesn't show a title, it shows instead "$services.localization.render($categoryDoc.getValue('name'))"
  • Closed BLOG-32 Find a way to display blog post actions

v9.3.3

  • Closed BLOG-87 Fail to display notifications on XWiki 9.4-rc-1

v9.3.2

  • Closed BLOG-86 Blog is not properly imported in Repository Application since the move to contrib

v9.3.1

  • Closed BLOG-58 Fix translation for Blog entry in Applications Panel and Application Index

v9.3

  • Closed BLOG-1 Migrate from platform to contrib

Dependencies

Dependencies for this extension (org.xwiki.contrib.blog:application-blog-ui 9.5.1):

Created by Guillaume Lerouge on 2007/04/04 02:09
    

Get Connected