# exp-blog **Repository Path**: mirrors_embedthis/exp-blog ## Basic Information - **Project Name**: exp-blog - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2025-09-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README exp-blog === Expansive plugin for blogs. ## Overview The exp-blog plugin provides a framework for blogging. ## Installation pak install exp-blog The blog service manages blog posts written using Markdown and generates a blog home page, blog categories, archive and RSS feeds. ### Configuration * categories — Directory under 'dist' to contain the blog post category indexes. * csp — Generate content suitable for use with Content Security Protocol. This means no inline scripts or styles. Defaults to true. * enable — Enable the blogging service. Default to true. * home — Home directory for the blog. Defaults to '.' * posts — Directory under 'contents' containing blog posts. Defaults to 'posts'. * recent — Number of recent posts to put on the home page. Defaults to 5. * rss — Generate an Atom / RSS feed. Defaults to true. * top — Top URL for the blog. Defaults to '@~' ## Creating Posts Posts are created as [Markdown](https://daringfireball.net/projects/markdown/) files under the contents/posts directory. You can create subdirectories under the contents/posts directory using any directory structure. Posts have a section of meta data at the top of the Markdown file between braces **{}**. The meta data defines the post layout, title, date, post categories and draft status. Post categories are any strings that help to classify your posts. There are two special directives that help format your post. The \ string marks the end of a leading summary portion that is used on the blog home page. The \ string may be used to clear the HTML floating of text around images. It is recommended that you install the [exp-blog-skeleton](https://github.com/embedthis/exp-blog-skeleton) to get started using exp-blog. This skeleton includes a starter blog site with plugins, layouts, partials and configuration to immediately start bloggin. You can copy the sample post contents/posts/first-post.html.md to get you started. This is currently configured as a draft post. Set draft to false to see the post. ## Blog Meta Data The blog service supports additional meta data fields. * draft — If true, the post is in draft form and will not be rendered. Defaults to false. * date — Date the post was written. Use the form: 'YYYY-MM-DD MM:SS' using a 24-hour clock. Defaults to now. * categories — Array of blog categories. Categories are arbitrary strings. * title — Title of the post. This is used in the HTML page title. ## API ### renderBlogImage renderBlogImage(url, options) #### Options * alt — Alternate text to use with the image. Default to the image basename. * clearfix — Clear the packing of the current HTML element. Defaults to false. * css — CSS selector to use in styling the image. Defaults to none. * lead — If true, the image is regarded as a post lead image. The image is formatted at 20% width on the summary page and 40% on the post page. The text is right aligned around the image. Defaults to false. * ifpost — If true, the image appears on the post page itself. Defaults to true. * ifsummary — If true, the image appears on the blog summary page. Defaults to true. * post — Hash of options to apply only on the post page. Defaults to none. * style — Inline styles to use in styling the image. Defaults to none. * summary — Hash of options to apploy only on the blog summary page. * width — Width of the image. This is converted into a CSS style of the form: 'width-NN' where NN is the width rounded down to the nearest power of 10. Default is none. * widths — Array of image widths. The first element is the width for the summary page, and the second width is the width for the post page. Default is none. ## Get Pak [https://www.embedthis.com/pak/](https://www.embedthis.com/pak/)