Customization Settings
Header Logo
Edit the _config.linen.yml file located in your site’s root directory (create it if it doesn’t exist), and add the following configuration:
1 | logo: |
Replace src, width, and height with your logo image path and dimensions.
If you prefer a text-only logo, you can configure text instead:
1 | logo: |
Favicon & Asset Version
You can customize the site favicon and the cache-busting query version appended to CSS/JS assets (?v=...) in _config.linen.yml:
1 | icon: /img/favicon.svg # Defaults to /linen-theme/favicon.svg |
Header Navigation Menu
Add the following to _config.linen.yml:
1 | navItems: |
Site Information
Add the following to _config.linen.yml:
1 | info: |
avatar: Author avatar image shown in the sidebar. Free avatar illustrations can be found at https://unsplash.com/s/illustrations/avatar?license=free.github: GitHub icon link on the right side of the top navigation bar.about: Destination link for the footer “About This Site” heading (supports internal paths like/about/or full external URLs; if omitted, renders as plain non-clickable text).siteCardBg: Default Open Graph cover image (og:image) when sharing the site.copyright: Custom copyright license text displayed in the footer©popover; falls back to the theme’s built-in localized text if omitted.registration: Optional footer ICP/registration notice.
Lazy Loading
Lazy loading for images, videos, and <iframe> embeds must be explicitly enabled (enable: true) in _config.linen.yml:
1 | lazyload: |
Except for enable, the values above are defaults and can be customized as needed. After changing enable, run hexo clean before rebuilding. For advanced placeholders, lightbox EXIF metadata, and HDR switching, see HDR & Advanced Image Settings.
PhotoSwipe Lightbox
Linen bundles PhotoSwipe and requires explicit opt-in in _config.linen.yml:
1 | photoswipe: true |
Once enabled globally, you can still disable it per post via photoswipe: false in Front Matter. On posts without images or Live Photos, PhotoSwipe assets are not loaded.
LaTeX Math Formulas
To enable built-in server-side KaTeX rendering globally, add to _config.linen.yml:
1 | latex: true |
You can also enable it per post or customize KaTeX options/macros. See LaTeX Math Formulas for details.
Injecting Scripts & Styles (heads / appends)
Use heads to inject custom CSS or scripts inside <head>, and appends to append HTML/scripts right before </body> (such as analytics scripts):
1 | heads: |
Tip: The post metadata bar includes
<span id="busuanzi_value_page_pv"></span>, so injecting the Busuanzi script automatically displays page view counts.
Bilingual Site Configuration
If you maintain separate Chinese and English domains (or subpaths), configure siteOriginLocaleMap in _config.linen.yml:
1 | siteOriginLocaleMap: |
To make the top-right language switcher link properly to matching pages:
- Posts: Declare the target translation locale in each post’s Front Matter, e.g.
translations: ['zh-CN']on the English site andtranslations: ['en']on the Chinese site (both posts should share the same slug/path). - Series / Categories / Tags: Create corresponding JSON mapping files under
assets-db/in your site root withmappingNamepointing to the target locale’s path name:assets-db/series.jsonassets-db/categories.jsonassets-db/tags.json
Example assets-db/categories.json:
1 | { |
1 | --- |