冲鸭博客 Brand

cms/blog · v2.0.2

Blog Theme Guide

Quick reference for running a blog, news, or announcements site on Baklib with the blog template. Static URL: /s/about.

1. Overview

Template name

blog (themes/cms/blog) — Baklib CMS scope, version 2.0.2. Stack: Tailwind CSS v4, daisyUI v5, Turbo + Stimulus, Lucide icons.

Purpose

Highlights

Storefront templates

2. For content managers

  1. Create a site — In the template marketplace, select the blog template to start a new CMS site.
  2. Configure the site — In admin: site language, theme colors (recommended palettes in theme settings), home page dynamic fields (title, description, hero image), custom domain, Feedback form toggle, and access control as needed. Wire header/footer menus via header_menu_html / footer_menu_html in theme settings.
  3. Publish content — Add child pages under home, choose the Page template, fill dynamic fields (title, cover, body, tags), then publish and preview. Switch the home page template between index (cards) and index.list (list + search) anytime.

Site tags are created in admin (not in theme settings). Attach them on articles via the page template tag_picker field. Seed sample menus live in seeds/001_site.yml.

3. For developers

Baklib CMS templates

Theme development conventions (Liquid layout, objects, static routes, seeds) are documented in the baklib-theme-dev agent skill — path /baklib-theme-dev in the Baklib repo (not a public URL). Platform API and Liquid reference: dev.baklib.cn.

File tree (concise)

cms/blog/
├── config/settings_schema.json
├── layout/theme.liquid, error.liquid
├── templates/
│   ├── index.liquid          # home — card grid
│   ├── index.list.liquid     # home — list + search
│   ├── page.liquid, tag.liquid, search.liquid
│   └── feedback_*.liquid
├── snippets/
│   ├── _index_hero.liquid
│   ├── _tags_toolbar.liquid, _card_grid.liquid, _list.liquid
│   ├── _breadcrumb.liquid, _header.liquid, _footer.liquid
│   ├── _theme_runtime_colors.liquid, _icon.liquid
│   └── …
├── statics/about.liquid, brand.liquid, tags.liquid, recent.liquid
├── seeds/001_site.yml, 002_pages.yml
├── src/ → built to assets/ (npm run build)
└── locales/*.json

Key implementation spots

Pagination example (escaped): {% paginate_tag pages_in_list, per: 9 %}. After editing src/, run npm run build before committing built assets.

4. Resources

Other static routes: /s/tags, /s/recent.