Skip to content

feat: LOGO_HEIGHT env var to control the site logo size - #414

Merged
oleeskild merged 1 commit into
mainfrom
logo-height
Aug 30, 2026
Merged

oleeskild merged 1 commit into
mainfrom
logo-height

Conversation

@oleeskild

Copy link
Copy Markdown
Owner

Adds a LOGO_HEIGHT env var so the plugin's new "Logo size" setting can control how large the site logo renders.

  • meta.js validates and normalizes the value: a bare number becomes pixels (64 → 64px), simple CSS lengths (3rem, 50%, …) pass through, and anything else is ignored so the env file can't inject arbitrary CSS.
  • pageheader.njk emits a :root override of --dg-logo-height, --dg-logo-height-mobile and --dg-filetree-logo-height when set.

Unset or invalid values leave the existing 40px default untouched. Verified with an eleventy build: LOGO_HEIGHT=64 renders --dg-logo-height:64px in the built pages.

Companion plugin PR: oleeskild/obsidian-digital-garden (Logo size setting + touched-keys env updates).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LYAomPqxuzVV25xjcqgGTs

A bare number is treated as pixels; other simple CSS lengths (rem, em, %,
vh, vw, ch) pass through, anything else is ignored so the env value can't
inject arbitrary CSS. Overrides --dg-logo-height, --dg-logo-height-mobile
and --dg-filetree-logo-height.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LYAomPqxuzVV25xjcqgGTs
@oleeskild
oleeskild merged commit 1ba90fb into main Aug 30, 2026
1 check passed
@oleeskild
oleeskild deleted the logo-height branch August 30, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant