docs/en/modules/cms-kit/blogging.md
//[doc-seo]
{
"Description": "Discover how to enable and manage the blogging feature in the CMS Kit, including UI elements for blogs and blog posts."
}
The blogging feature provides the necessary UI to manage and render blogs and blog posts.
By default, CMS Kit features are disabled. Therefore, you need to enable the features you want, before starting to use it. You can use the Global Feature system to enable/disable CMS Kit features on development time. Alternatively, you can use the ABP's Feature System to disable a CMS Kit feature on runtime.
Check the "How to Install" section of the CMS Kit Module documentation to see how to enable/disable CMS Kit features on development time.
The built-in MVC blog routes are registered by the Pages global feature. Enable both
BlogsandPageswhen you use the built-in public blog pages.
The following menu items are added by the blogging feature to the admin application:
Blogs page is used to create and manage blogs in your system.
A screenshot from the new blog creation modal:
Slug is the URL part of the blog. For this example, the root URL of the blog becomes your-domain.com/blogs/technical-blog/.
You can change the default route prefix by using the CmsBlogsWebConsts.BlogsRoutePrefix property. For example, if you set it to foo, the root URL of the blog becomes your-domain.com/foo/technical-blog/.
public override void PreConfigureServices(ServiceConfigurationContext context)
{
CmsBlogsWebConsts.BlogsRoutePrefix = "foo";
}
The blogging feature uses other CMS Kit features. A newly created blog enables comments, reactions, ratings, tags, marked items, the quick navigation bar and XSS prevention by default; where a corresponding global feature exists, it still controls whether the blog feature takes effect. You can enable or disable these features for each blog by clicking the features action.
You can select/deselect the desired features for blog posts.
If you enable Quick navigation bar in blog posts, the public blog post page builds a scroll index from the post headings.
When you create blogs, you can manage blog posts on this page.
You can create and edit an existing blog post on this page. If you enable specific features such as tags, you can set tags for the blog post on this page.
Blog posts have three statuses: Draft, WaitingForReview and Published. Creating, updating, deleting and publishing posts use separate permissions. The public blog list requests only published posts and can filter them by author, tag or the current user's marked items.
The built-in renderer allows HTML in blog post Markdown. The per-blog Prevent XSS feature controls whether the Markdown renderer sanitizes that HTML and is enabled for newly created blogs. Keep it enabled when post authors are not trusted to submit arbitrary HTML.
This module follows the Entity Best Practices & Conventions guide.
Blog (aggregate root): Presents blogs of application.BlogPost(aggregate root): Presents blog posts in blogs.BlogFeature:(aggregate root): Presents blog features enabled/disabled state. Such as reactions, ratings, comments, etc.This module follows the Repository Best Practices & Conventions guide. The following repositories are defined for this feature:
IBlogRepositoryIBlogPostRepositoryIBlogFeatureRepositoryThis module follows the Domain Services Best Practices & Conventions guide.
BlogManagerBlogPostManagerBlogFeatureManagerBlogFeatureAppService (implements IBlogFeatureAppService)BlogAdminAppService (implements IBlogAdminAppService)BlogFeatureAdminAppService (implements IBlogFeatureAdminAppService)BlogPostAdminAppService (implements IBlogPostAdminAppService)BlogPostPublicAppService (implements IBlogPostPublicAppService)Check the "Entity Extensions" section of the CMS Kit Module documentation to see how to extend entities of the Blogging Feature of the CMS Kit module.