Blog - Improve multi-blog support

Last modified by Vincent Massol on 2024/02/26 17:52

 XWiki
 Design
 Completed
 

[xwiki-devs]  [Proposal] Add a new type of blog (Isolated blog)

Description

The goal of this design document is to properly define how the implementation of the multi-blog feature introduced partially with the local blog type should be involved in order to fully implement XWIKI-6355 in order to allow fully independent blogs. While designing this improvement we tried to limit as much as possible any breakage if the current feature of the blog application, while reducing the complexity. This is the result of the discussion conducted on the mailing list, and discussions we had.

Constraints and Strategy

While envisioning the evolution of the categories in order to make them customisable per blog, the main constraints we have faced is that it would be difficult to mix blog posts that are classified with different sets of categories. Therefore, our strategy is to properly separate blogs and set of categories. Apart from the main Blog (in the Blog space), each blog will concentrate on their own posts only, and will be able to share if wanted the same set of categories. Each set of categories will display blog post classified in them independently of the originating blog, while uncategorised posts are only displayed in their blog.

Improvements

The improvement will provide the following features:

  • 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.
  • New set of categories can be created anywhere on the wiki, including under nested documents.
  • Blogs can share the same set of categories. 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.

Entry point

It is agreed that the blog application entry point should be a single link in the application panels even if multiple blog spaces are supported.
To allow access to the different blogs, some sort of blog dashboard would be a nice to have feature.
Because the Blog.WebHome page already have multiple existing functions, this is probably not a place for that Dashboard, this is why we envision a Blog.Dashboard page pointed to by the application panel.
The detail about the design of that page still needs to be defined.

Major changes and breakages

Listed here are the major changes and potential breakage introduced by the new design:

  • New blogs will be created under any new document only, existing space will not be usable anymore (no more the option of creating blog inside a space where the blog is not the main application of that space)
  • Blog types (global/local) are abandoned
  • The welcome page of the Blog blog (Blog.WebHome) will display all articles of the Blog space and all articles classified into any category of the Blog space, but no more uncategorised articles of other blogs. Breakage
  • New blogs will be linked to a separate set of categories, by default located in a Categories subspace of the blog space.

Contextual details

For each context, we define here under what will be the behaviour of each blog features that will be impacted by this improvement:

  • Blog List content is about the list of blog post shown in the content part of the screen and the ability to create new posts
  • Recent Posts panel is the panel displaying the list of recently posted articles
  • Unpublished Posts panel is the panel displaying unpublished articles
  • Archive panel is the panel displaying older articles
  • Categories panel is about the panel displaying categories and also the management of categories
  • Blog panel is a new panel proposed to display all blogs sharing a same set of categories

aBlog.aPost or aBlog.WebHome

This is the context of a given post (aBlog.aPost) and the welcome page of a blog (aBlog.WebHome).

  • Blog List content (on WebHome)
    • List all blog posts that is in blog space aBlog
    • Create new blog posts in blog space aBlog
  • Recent Posts panel
    • List all recent posts in blog space aBlog
  • Unpublished Posts panel
    • List all unpublished posts in blog space aBlog
  • Archive panel
    • List all archived posts in blog space aBlog
  • Categories panel
    • List all categories in the category space used by aBlog
    • Manage categories in the acategory space used by aBlog, use a sheet its WebHome
    • "All" link to the acategory space used by aBlog WebHome
    • categories link to the category page (in its space obviously)
    • counts are the counts matching the list shown on links target
  • Blog panel
    • List links to WebHome of all blog space that use the same category space than blog aBlog including aBlog sort alphabetically

aCategorySpace.aCategory

This is the context of a given category (aCategorySpace.aCategory).

  • Blog List content
    • List all blog post that is in that category aCategorySpace.aCategory
    • Do not allow creation of new blog post (option: allow choosing the blog on creation, and set category to this category, seems complex and not really useful)
  • Recent Posts panel
    • List all recent posts that are in that category aCategorySpace.aCategory
  • Unpublished Posts panel
    • List all unpublished posts that are in that category aCategorySpace.aCategory
  • Archive panel
    • List all archived posts that are in that category aCategorySpace.aCategory
  • Categories panel
    • List all categories in the aCategorySpace space
    • Manage categories in the aCategorySpace space, use a sheet on aCategorySpace.WebHome
    • "All" link to aCategorySpace.WebHome
    • categories link to aCategorySpace.theCategory
    • counts are the counts matching the list shown on links target
  • Blog panel
    • List links to WebHome of all blog space that use aCategorySpace for categories sort alphabetically

aCategorySpace.WebHome

This is the context of the welcome page ("All categories") of a set of categories.

  • Blog List content
    • List all blog posts that are in a category aCategorySpace.%
    • Do not allow creation of new blog post (option: allow choosing the blog on creation, seems complex and not useful)
  • Recent Posts panel
    • List all recent posts that are in a category aCategorySpace.%
  • Unpublished Posts panel
    • List all unpublished posts that are in a category aCategorySpace.%
  • Archive panel
    • List all archived posts that are in a category aCategorySpace.%
  • Categories panel
    • List all categories in the aCategorySpace space
    • Manage categories in the aCategorySpace space, use a sheet on aCategorySpace.WebHome
    • "All" link to aCategorySpace.WebHome
    • categories link to aCategorySpace.theCategory
    • counts are the counts matching the list shown on links target
  • Blog panel
    • List links to WebHome of all blog space that use aCategorySpace for categories sort alphabetically

Blog.aPost or Blog.WebHome

This is a special case for the actual Blog space, for a given post (Blog.aPost) and its welcome page (Blog.WebHome).
Please note that the welcome page of the Blog space is also the welcome page of the set of categories defined in the Blog space.

  • Blog List content (on WebHome)
    • List all blog posts that are in a category Blog.% or in space Blog
    • Create new blog posts in the Blog space
  • Recent Posts panel
    • List all recent posts that are in a category Blog.% or in space Blog (or in any space that use the Blog space for category)
  • Unpublished Posts panel
    • List all unpublished posts that are in a category Blog.% or in space Blog (or in any space that use the Blog space for category)
  • Archive panel
    • List all archived posts that are in a category Blog.% or in space Blog (or in any space that use the Blog space for category)
  • Categories panel
    • List all categories from the Blog space
    • Manage categories in the Blog space, use a sheet on Blog.WebHome
    • "All" link to Blog.WebHome
    • categories link to Blog.theCategory
    • counts are the counts matching the list shown on link target
  • Blog panel
    • List links to WebHome of all blog space that use Blog for categories sort alphabetically
  • RSS Flow
    • Existing RSS URL should be maintained (for existing subscribers)
    • RSS will only work like the Blog List content defined above (for Blog space, no more post from other space without category)
    • New proposed RSS URL will point to:
    • The blog WebHome for a blog rss with a specific sheet
    • The category page for a category with a specific sheet
    • The category WebHome for "All" RSS with a specific sheet

Implementation details

BlogClass

Changes into the blog descriptor:

  • The type properties will be dropped
  • A new property will be added to hold the reference to the space where the set of categories for that blog is located. Empty value will be like specifying the Blog space.

Blog Creation page

New form for the blog creation page, that should be added into the administration application (configurable class):

  • Location picker to choose a blog title and a location
  • For now, a non-editable field showing the category location (in the future use a second picker for the location of the set of categories)
  • The blog location should be in a new space
  • The category space for the new blog will be a "Categories" space under the blog space
  • Create:
    • the blog WebHome
    • the Categories space WebHome
    • a default set of categories
    • a WebPreferences in the blog space to display right panels, with Recent post panel, Unpublished post panel, Category panel and Archive panel

Macros

Macro to create in other to implement the features of the blog applications and ease usage of it outside of the blog application.

  • BlogPostList
    • blog : space of the blog to display only post of it (not mandatory, at least blog or category mandatory)
    • category : either a given category or a category space (not mandatory, at least blog or category mandatory)
    • year : limit post to a given year
    • month : limit post to a given month
    • published : (yes), no, all
    • hidden : (no), yes, all
    • limit : number of post to display
    • macro content : template to display a single post, if no content display post as list of link. Binding provided $blogPostName = full name of the post, $blogPostCount = index du post.
  • BlogPostCreate
    • blog : space of the blog to create the post into

 

Get Connected