Jack's Blog

Skip to content
Go back

Theme Configuration

Jack
Jack
Published at: 2026-07-03 10:53:01

Theme Configuration

Story is a blog theme for everkm-publish, migrated from hexo-theme-redefine. The default template is post. Site-level configuration lives under the config node in workspace __everkm/everkm.yaml; URL rules for content directories are set in folders. Theme defaults are defined in __everkm/theme/story/everkm-theme.yaml.

Configuration Overview

# __everkm/everkm.yaml

config:
  site: { ... }           # Site basic info
  home: '[[_home]]'       # Homepage data source marker (underscore file)
  about: '[[_about]]'     # About page content
  links: '[[_links]]'     # Friend links data
  posts: { ... }          # Post list pagination
  features: { ... }       # Feature toggles
  story: { ... }          # Story theme appearance & layout
  code_highlight: { ... } # Server-side code highlighting
  math_render: { ... }    # Server-side math rendering
  socials: [ ... ]        # Social links (banner & footer)
  copyright: { ... }      # Footer "Powered by" line
  algolia_search: { ... } # Optional Algolia search

folders:
  "/":
    url_slug: posts
    url_id_suffix: false

Site Info site

FieldTypeDescription
site.namestringSite name, used in page title, header, footer, banner, etc.
site.descriptionstringSite description (publish metadata; also used as banner subtitle fallback)
site.authorstringAuthor name shown on post pages and homepage sidebar
site.profilestringAuthor avatar image path, e.g. /assets/images/avatar-0.jpg
site.langstringSite language, e.g. en, zh
site.timezonestringTimezone for date display, e.g. UTC, Asia/Shanghai
site.dirstringText direction, ltr or rtl

Example:

config:
  site:
    name: My Blog
    description: Your personal blog journey.
    author: Jane Doe
    profile: /assets/images/avatar-0.jpg
    lang: en
    timezone: UTC

Virtual Pages home / about / links

Story uses virtual templates for several pages. Body content and structured data come from underscore-prefixed Markdown files referenced by inner links:

FieldDefaultDescription
home[[_home]]Homepage data source marker (_home.md; excluded from public post lists; banner copy is configured under story.home_banner)
about[[_about]]About page Markdown
links[[_links]]Friend links data (links array in front matter)

The album page (/album/index.html) is also a virtual template. It collects images from public post content via the Everkm posts_resources API — no separate data file is required.

Example content layout:

en/
├── _home.md          # Homepage data source marker (banner uses story.home_banner)
├── _about.md         # About page
├── _links.md         # Friend links data
├── README.md         # Theme configuration docs
├── CHANGELOG.md      # Changelog
└── hello-world.md    # Blog posts (at content root)

Do not create a root index.md. If /index.html resolves to a Markdown file, it renders as a regular post detail page instead of the virtual homepage.

Files whose basename starts with _ are treated as data sources, not public posts.


Posts posts

FieldTypeDefaultDescription
posts.per_pagenumber10Posts per page on the homepage, posts list, and tag pages

Homepage pagination uses the site root, e.g. /index.html, /index.p2.html.


Feature Toggles features

FieldTypeDefaultDescription
features.light_and_dark_modebooleantrueLight / dark mode toggle in the header
features.show_archivesbooleantrueShow the archives entry in the header (when using default nav)
features.show_back_buttonbooleantrueShow a back button on post detail pages
features.view_transitionsbooleantrueEnable in-site View Transitions navigation
features.preloaderbooleanfalseShow a loading screen on first visit
features.particlesbooleanfalseAnimated particles background
features.home_bannerbooleantrueShow the homepage banner
features.home_sidebarbooleantrueShow the homepage sidebar

Example:

config:
  features:
    light_and_dark_mode: true
    show_archives: true
    show_back_button: true
    view_transitions: true
    preloader: true
    particles: false
    home_banner: true
    home_sidebar: true

Story Theme story

Story-specific appearance and layout options. Defaults are provided in everkm-theme.yaml.

Colors story.colors

FieldDefaultDescription
story.colors.primary#A31F34Accent color
story.colors.default_modelightDefault color mode (light or dark)

Homepage Banner story.home_banner

FieldDefaultDescription
story.home_banner.enabletrueEnable the banner (also controlled by features.home_banner)
story.home_banner.stylefixedfixed — full hero on page 1, blurred background on later pages; static — inline banner
story.home_banner.image.lightbundled imageLight-mode background image
story.home_banner.image.darkbundled imageDark-mode background image
story.home_banner.titlesite nameBanner title
story.home_banner.subtitleStatic string, or typing config (see below)

Subtitle typing config:

story:
  home_banner:
    subtitle:
      text:
        - Welcome to my blog
        - Your personal blog journey.
      typing_speed: 100
      backing_speed: 80
      starting_delay: 500
      backing_delay: 1500
      loop: true
      smart_backspace: true
      hitokoto:
        enable: false
        show_author: false
        api: https://v1.hitokoto.cn

When hitokoto.enable is true, the banner fetches random quotes from the configured API instead of text.

Homepage Sidebar story.home_sidebar

FieldDefaultDescription
story.home_sidebar.enabletrueEnable sidebar (also controlled by features.home_sidebar)
story.home_sidebar.positionleftleft or right
story.home_sidebar.announcementOptional announcement text below the site name

Navbar story.navbar

FieldDefaultDescription
story.navbar.auto_hideShrink navbar on scroll
story.navbar.color.left#f78736Left gradient color (navbar background)
story.navbar.color.right#367df7Right gradient color
story.navbar.linksCustom navigation links (replaces default nav when set)

Link item:

story:
  navbar:
    links:
      - label: Home
        path: /index.html
        icon: home
      - label: Album
        path: /album/index.html
        icon: album
      - label: Github
        path: https://github.com/everkm/theme-story
        external: true
        icon: github

Supported icon keys include home, archives, github, album, links, about, and others mapped in the theme.

Global story.global

FieldDefaultDescription
story.global.scroll_progress.barfalseShow reading progress bar at the top
story.global.scroll_tools.enabletrueShow scroll-to-top and font-size controls
story.global.preloader.messagesite namePreloader text
story.global.preloader.max_duration_ms2500Maximum preloader display time

Articles story.articles

FieldDefaultDescription
story.articles.toc.enablefalseTable of contents on post pages
story.articles.toc.max_depth3Maximum heading depth for TOC
story.articles.copyright.enabletrueShow copyright block at the bottom of posts
story.articles.copyright.defaultcc_by_nc_saDefault license when post front matter has no copyright

Supported license keys: cc_by_nc_sa, cc_by, cc_by_nc, cc_by_nd, cc_by_sa, cc0, all_rights_reserved.


Search algolia_search

When configured, the Algolia full-text search component appears in the header (requires plugin-in-search build artifacts).

config:
  algolia_search:
    app_id: YOUR_APP_ID
    api_key: YOUR_SEARCH_API_KEY
    index_name: your_index
    site: your-site-id
FieldDescription
app_idAlgolia Application ID
api_keyAlgolia Search-Only API Key
index_nameIndex name
siteSite identifier (used internally by the plugin)

Code Highlighting code_highlight

Server-side syntax highlighting via everkm-publish:

config:
  code_highlight:
    server: true

When server: true, code blocks are highlighted at build time using syntect themes scoped to .app-prose.


Math Rendering math_render

Server-side math rendering via Typst:

config:
  math_render:
    server: true
    font_size: 14
FieldTypeDefaultDescription
math_render.serverbooleanEnable server-side math rendering
math_render.font_sizenumber14Base font size for rendered math SVG

Use $...$ for inline math and $$...$$ for block math in Markdown.


Social Links socials

Displayed on the homepage banner and in the footer:

config:
  socials:
    - name: github
      url: https://github.com/everkm/theme-story

Supported name values include github, twitter, x, facebook, linkedin, mail, telegram, whatsapp, pinterest, and others mapped to icons in the theme. Unknown names render as text.


Copyright copyright

Controls the "Powered by" line in the footer (separate from the automatic © year site name line):

config:
  copyright:
    text: Everkm
    link: https://publish.everkm.com

Directory Rules folders

Story's default theme configuration maps content at / to URLs under /posts/:

folders:
  "/":
    url_slug: posts
    url_id_suffix: false
FieldDescription
url_slugURL prefix for content in this directory
url_id_suffixWhen true, URLs include a stable ID suffix, e.g. /posts/my-post-123.html

Site-level folders in __everkm/everkm.yaml override theme defaults.


Virtual Page Routes

Story provides these virtual pages (no corresponding public Markdown file required):

URLPageDescription
/index.htmlHomeBanner, sidebar, paginated article list
/index.p{N}.htmlHome (page N)Homepage pagination
/posts/index.htmlPosts listPaginated post index
/tags/index.htmlTags indexAll tags
/tags/{tag}/index.htmlTag postsPosts filtered by tag
/archives/index.htmlArchivesPosts grouped by year and month
/about/AboutAbout page from config.about
/links/index.htmlLinksFriend links from config.links
/album/index.htmlAlbumImages extracted from public post content

Friend Links _links.md

Friend link data is stored in the front matter of _links.md:

---
title: Links
links:
  - category: Example Category
    has_thumbnail: true
    list:
      - name: Partner Site
        link: https://example.com
        description: Site description
        avatar: /assets/images/avatar-0.jpg
        thumbnail: /assets/images/desc-image.jpg
  - category: Simple List
    has_thumbnail: false
    list:
      - name: Another Site
        link: https://example.com
        description: Short description
        avatar: /assets/images/avatar-1.jpg
---

Album

The album page automatically collects images embedded in public posts (Markdown ![]() and image links). Everkm resolves image URLs at build time; the theme renders them in a MiniMasonry grid with hover captions and a lightbox.

Images in posts whose path starts with _ (data sources such as _about.md) are excluded. Add images to regular blog posts to populate the album.


Article Front Matter

Common fields for blog posts:

FieldTypeDescription
titlestringPost title
descriptionstringPost summary for meta and cards
coverstringCover image URL or path; shown on homepage cards and post hero
created_atstringCreation time, RFC3339 format
updated_atstringUpdate time, RFC3339 format
slugstringURL path segment
tagsarrayTags for filtering
draftbooleanWhen true, excluded from public lists
copyrightstringLicense key override for the post copyright block

Example:

---
title: Hello World
description: My first blog post.
cover: /assets/images/cover.jpg
created_at: 2026-06-28T10:00:00Z
tags:
  - intro
copyright: cc_by
---

If the first h1 in the body matches the Front Matter title, it is automatically hidden during rendering.


Content Markdown Extensions

Story inherits everkm-publish Markdown extensions. See the demo post Everkm Markdown Format for a full showcase, or the Everkm Markdown guide.

Supported extensions include:

  • Inner links [[...]]
  • Block attribute sets {.class #id}
  • Inline attribute sets on links and images
  • Macros (macro/toc, macro/include)
  • Highlight text, superscript, subscript
  • Definition lists, footnotes, task lists

Reader Settings (Browser-side)

The following are stored locally in the user's browser and are not configured in everkm.yaml:

  • Light / dark mode preference (when features.light_and_dark_mode is enabled)
  • Font size level (when story.global.scroll_tools.enable is enabled)

Toggle color mode via the sun / moon button in the header. Adjust font size via the +/- buttons in the scroll tools panel.


Theme Metadata

ItemValue
Theme namestory
Default templatepost
Demo sitehttps://story.theme.everkm.com/
Repositoryhttps://github.com/everkm/theme-story
  • Article title: Theme Configuration
  • Author: Jack
  • Created: 2026-07-03 10:53:01
  • Permalink: /posts/readme.html
  • License: CC BY-NC-SA 4.0