Blog Application
Create and manage blog posts |
Type | XAR |
Category | |
Developed by | |
Active Installs | 365 |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Creating one or several Blogs
By default a recent XWiki installation will provide a blog inside the Blog space.
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.
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)
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:
- 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:
- 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:
Post image thumbnail
Blog post image thumbnail
Useful Macros
, 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
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
blog | yes | a document reference | The descriptor document of a blog (It should contain a document with a Blog.BlogClass object). | , if the 'blog' parameter is empty, the blog descriptor is no longer initialized by default to 'Blog.WebHome', so, the macro will look for the blog posts in all the wiki not just on the default wiki (The blog under the 'Blog' space).|
category | yes | a document reference | Either a given category or a category space (not mandatory, at least blog or category mandatory) | |
published | yes | yes, no, all | yes | Limit results to published posts |
hidden | yes | yes, no, all | no | Limit results to hidden posts |
fromDate | yes | string date | Limit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd. | |
toDate | yes | string date | Limit posts to posts published before a given date. The format of the date is yyyy-mm-dd. | |
limit | yes | integer | 10 | Number of posts to display |
layout | yes | link,full,image, cards | link | The name of the post layout macro that will be used to display the posts. The naming convention for the layout macros is: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}" |
layoutParams | yes | string | Additional parameters of the blog post layout | |
paginated | yes | yes,no | if the limit parameter is not provided the itemsPerPage is extracted from the blog descriptor | Used 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
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
reference | no | a document reference | The document reference of the blog post | |
params | yes | string | Additional parameters of the blog post layout |
Examples of post layouts
The link post layout(BlogPostLayoutLink macro)
The full (default) post layout(BlogPostLayoutFull macro)
The image post layout(BlogPostLayoutImage macro)
Cards post layout
the Cards layout has been integrated, the cards layout allow selecting pinned posts that will be displayed before the rest of the blog posts in big and beautiful blocs. see the following image gallery:
Note that the display of the pinned posts on the Cards layout can be enabled by setting the forceDisplayPinnedPosts parameter to true.
Use the Cards layout with the Blog Post List Macro macro as follows:
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.
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:
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.
Display the Blog panels in other locations
Have you ever wondered how could you display the list of recent blog posts on the main page of the wiki?
We implemented a Wizard, accessible from the More Actions menu (Blog configuration), to setup a configuration that would update the Right Panels section. If there are already some panels displayed, you can choose to keep them and add the ones from Blog, before or after, or even to replace them. See the images in following gallery:
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
The Blog Categories Panel
A Blog Article
A Blog Main Page
, Blogs panel is proposed to display all blogs sharing a same set of categories
Blogs panel
Notifications
, users can observe the Blog Application in their notifications preferences:
Then, when a blog post is published, a notification is displayed on the top menu.
Blog categories
Category pages display the blog posts associated to the category from the blog. The layout of the blog posts list on the category pages follows the layout set at the blog level, for the blog to which the category belongs.
Blog Application 9.13+ Blog category pages can have editorial content that supports any wiki syntax. This content will be displayed above the articles list. In order to set / modify this content, edit the blog category page; whatever content you add in the content of the category page, it will be displayed above the blog posts list.
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.
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:
- Log in the wiki with a user having Administration rights
- Go to the Administration page and select the Import category
- Follow the on-screen instructions to upload the downloaded XAR
- Click on the uploaded XAR and follow the instructions
- You'll also need to install all dependent Extensions that are not already installed in your wiki
Release Notes
v9.13.9
The following translations have been updated with this release:
v9.13.8
v9.13.7
v9.13.6
The following translations have been updated with this release:
v9.13.5
v9.13.4
v9.13.3
The following translations have been updated with this release:
v9.13.2
v9.13.1
v9.13
v9.12
v9.11.6
The following translations have been updated with this release:
v9.11.5
v9.11.4
The following translations have been updated with this release:
v9.11.3
v9.11.2
v9.11.1
v9.11
v9.10.10
v9.10.9
The following translations have been updated with this release:
v9.10.8
v9.10.7
v9.10.6
The following translations have been updated with this release:
v9.10.5
v9.10.4
v9.10.3
v9.10.2
v9.10.1
v9.10
The following issues have been resolved:
The following translations have been updated:
v9.9.1
v9.9
v9.8
v9.7.1
v9.7
v9.6
v9.5.1
v9.5
v9.4
v9.3.3
v9.3.2
v9.3.1
v9.3
Dependencies
Dependencies for this extension (org.xwiki.contrib.blog:application-blog-ui 9.13.9):
- org.xwiki.contrib.blog:application-blog-api 9.13.9
- org.xwiki.platform:xwiki-platform-localization-macro 8.4.2
- org.xwiki.platform:xwiki-platform-rendering-macro-velocity 8.4.2
- org.xwiki.platform:xwiki-platform-rendering-macro-include 8.4.2
- org.xwiki.rendering:xwiki-rendering-macro-html 8.4.2
- org.webjars:select2 4.0.5