Solitude Docs

Advanced Configuration

Configure optional rendering, PWA, injection, UI, ads, and CDN features.

Content and rendering

wordcount: true
mermaid: true
chart: false
typeit: false
katex:
  enable: true
  per_page: false
  copytex: true

Word counts require hexo-wordcount. With katex.per_page: false, enable formulas on individual pages using katex: true Front Matter.

PWA and injection

pwa:
  enable: true
  manifest: /manifest.json
  theme_color: "#425AEF"
  mask_icon: /img/pwa/favicon.png
  apple_touch_icon: /img/pwa/favicon.png
  bookmark_icon: /img/pwa/favicon.png
  favicon_32_32: /img/pwa/favicon_32.png
  favicon_16_16: /img/pwa/favicon_16.png

extends:
  head:
    - <link rel="stylesheet" href="/css/custom.css">
  body:
    - <script src="/js/custom.js"></script>

Custom scripts must follow the Solitude 4 lifecycle guidance in Browser API.

UI, ads, and CDN

console, keyboard, rightside, footer, translate, memorial, and google_adsense are optional top-level sections. Start from their complete block in the v4 default configuration instead of inventing partial nested keys.

CDN:
  internal: local # local / cdnjs / jsdelivr / unpkg / custom
  third_party: custom
  version: true
  custom_format: https://cdn.jsdelivr.net/npm/${name}@${version}/${min_file}
  options:
    # fontawesome: https://example.com/fontawesome.css

When internal is not local, the complete v4 ES-module tree must remain available at matching relative paths.