index
Functions
Section titled “Functions”studioCMSBlogPlugin()
Section titled “studioCMSBlogPlugin()”function studioCMSBlogPlugin(options?: { blog: { enableRSS: boolean; route: string; title: string; }; favicon: string; htmlDefaultHead: { attrs: Record<string, undefined | string | boolean>; content: string; tag: | "title" | "link" | "base" | "meta" | "noscript" | "script" | "style" | "template"; }[]; htmlDefaultLanguage: string; injectRoutes: boolean; sitemap: boolean; }): StudioCMSPlugin
Defined in: studiocms/packages/@studiocms/blog/src/index.ts:39^
Creates and configures the StudioCMS Blog plugin.
Parameters
Section titled “Parameters”options?
Section titled “options?”Optional configuration options for the blog plugin.
{
enableRSS
: boolean
;
route
: string
;
title
: string
;
} = ...
The configuration for the blog
blog.enableRSS
Section titled “blog.enableRSS”boolean
= ...
Enable RSS feed
blog.route
Section titled “blog.route”string
= ...
The route for the blog
Default
'/blog'
Example
'/news'
blog.title
Section titled “blog.title”string
= ...
The title of the blog
favicon
Section titled “favicon”string
= ...
Favicon Configuration - The default favicon configuration for the Frontend
htmlDefaultHead
Section titled “htmlDefaultHead”{
attrs
: Record
<string
, undefined
| string
| boolean
>;
content
: string
;
tag
: | "title"
| "link"
| "base"
| "meta"
| "noscript"
| "script"
| "style"
| "template"
;
}[] = ...
HTML Default Header - The default head configuration for the Frontend
htmlDefaultLanguage
Section titled “htmlDefaultLanguage”string
= ...
HTML Default Language - The default language for the HTML tag
Default
'en'
injectRoutes
Section titled “injectRoutes”boolean
= ...
Inject routes
Default
true
sitemap
Section titled “sitemap”boolean
= ...
Enable sitemap generation
Default
true
Returns
Section titled “Returns”StudioCMSPlugin
The configured StudioCMS plugin.
Remarks
Section titled “Remarks”This function sets up the StudioCMS Blog plugin with the provided options or default values. It configures the plugin’s identifier, name, minimum version, frontend navigation links, page types, sitemap settings, and integration hooks.
Example
Section titled “Example”const blogPlugin = studioCMSBlogPlugin({ blog: { title: 'My Blog', enableRSS: true, route: '/my-blog' }, sitemap: true, injectRoutes: true});
References
Section titled “References”default
Section titled “default”Renames and re-exports studioCMSBlogPlugin