UNPKG

@studiocms/blog

Version:

Add a blog to your StudioCMS project with ease!

38 lines (37 loc) 1.64 kB
import type { AstroIntegration } from 'astro'; import { type StudioCMSPlugin } from 'studiocms/plugins'; import { type StudioCMSBlogOptions } from './types.js'; export declare function internalBlogIntegration(options?: StudioCMSBlogOptions): AstroIntegration; /** * Creates and configures the StudioCMS Blog plugin. * * @param {StudioCMSBlogOptions} [options] - Optional configuration options for the blog plugin. * @returns {StudioCMSPlugin} The configured StudioCMS plugin. * * @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 * ```typescript * const blogPlugin = studioCMSBlogPlugin({ * blog: { * title: 'My Blog', * enableRSS: true, * route: '/my-blog' * }, * sitemap: true, * injectRoutes: true * }); * ``` * * @param {StudioCMSBlogOptions} [options.blog] - Blog-specific options. * @param {string} [options.blog.title] - The title of the blog. Defaults to 'Blog'. * @param {boolean} [options.blog.enableRSS] - Whether to enable RSS feed. Defaults to true. * @param {string} [options.blog.route] - The route for the blog. Defaults to '/blog'. * @param {boolean} [options.sitemap] - Whether to trigger sitemap generation. Defaults to true. * @param {boolean} [options.injectRoutes] - Whether to inject routes for the blog. Defaults to true. */ export declare function studioCMSBlogPlugin(options?: StudioCMSBlogOptions): StudioCMSPlugin; export default studioCMSBlogPlugin;