mdcms/app/config.yml
Claude 6492329b27
v0.4 Phase 1: theme.yml — separate presentational config from config.yml
- Add app/theme.yml: colours (light/dark), semantic colours, callout
  defaults, fonts (with bunny: provider support), font-size, line-height,
  main-width, nav-width
- app/config.yml: add `theme: theme.yml` reference; remove font and
  layout keys that now live in theme.yml
- index.html: add applyThemeYml() that reads the new theme.yml format
  and derives all CSS custom properties (accent-rgb, nav-active-bg,
  nav-hover-bg, table-header-bg, link-colour) from the 5 user keys per
  mode; add --colour-info/warning/success/error CSS vars with hardcoded
  defaults; add --line-height-body CSS var
- index.html: update loadFonts() to accept themeConfig, support
  provider:name:weight format for Bunny Fonts and Google Fonts
- index.html: boot() fetches theme file named by config.theme, routes
  to applyThemeYml() for new format or applyConfigTheme() for legacy;
  falls back gracefully to hardcoded defaults when theme key is absent

https://claude.ai/code/session_015XtsgTMi8UtmgxEgb5Qt2c
2026-05-16 15:33:20 +00:00

45 lines
2 KiB
YAML

# mdcms v0.3 | DO NOT REMOVE THIS COMMENT
# MD-CMS v0.3 — Site configuration
#
# Only `sitename` and `navigation` are required. Uncomment and edit the rest
# as needed. See https://kbenestad.codeberg.page/md-cms for the full reference.
#
# LICENCE
# Copyright 2026 Kristian Benestad | kbenestad.codeberg.page
#
# Licensed under the Apache License, Version 2.0 (the "Licence");
# you may not use this file except in compliance with the Licence.
# You may obtain a copy of the Licence at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Licence is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# ──────────────────────────────────
# Site identity
# ──────────────────────────────────
sitename: MD-CMS New Site
navigation: topbar # sidebar | topbar
theme: theme.yml # presentational config — edit theme.yml to customise colours, fonts, and layout
# homepage: pages/home.md # override the default landing page
# sitedescription: A short description for meta tags
# logo: logo.svg # filename in assets/images/
# favicon: favicon.png
# footer: "© 2026 Your Name"
# ──────────────────────────────────
# Layout (optional)
# ──────────────────────────────────
# nav-position: left # left | right (sidebar mode)
# Typography and colours are configured in theme.yml, not here.
# ──────────────────────────────────
# Features (optional)
# ──────────────────────────────────
# search: true
# default-theme: system # light | dark | system