Skip to content

file-icons: accept false in files and languages to turn icons off - #8

Merged
ewels merged 1 commit into
mainfrom
feat/file-icons-off-per-type
Oct 5, 2026
Merged

ewels merged 1 commit into
mainfrom
feat/file-icons-off-per-type

Conversation

@ewels

@ewels ewels commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Closes #7

fileIcons.files and fileIcons.languages[lang].icon now accept false, meaning "no icon". A site can turn icons off for one file type or language (such as .mmd files) without icon=false on every block.

  • A false match stops the search: it does not fall through to the language or the generic file icon.
  • files keys keep their existing precedence (the later key wins), so { '.mmd': false, 'overview.mmd': 'markdown' } still gives that one file an icon.
  • icon="<name>" on the fence line still wins over both, and icon=false / no-icon are unchanged.
  • The code tabs menu shows its generic code icon for a language with icon: false.

Tests in test/file-icons.test.ts cover the cases above, the defaults, and validation (accepts false, still rejects true). The docs page, option descriptions and the skill are updated.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ewels
ewels merged commit 86cf16f into main Oct 5, 2026
3 checks passed
@ewels
ewels deleted the feat/file-icons-off-per-type branch October 5, 2026 10:28
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.

File icons: allow turning icons off per file type or language

1 participant