Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discourse Phosphor Icons

A Discourse theme component. Replaces the default Font Awesome icons with the open-source Phosphor icon set.

The weight setting lets you pick the Phosphor style used across the whole site: light, regular, bold, or duotone. Phosphor's fill weight isn't offered as a global style — filled is treated as a product state and applied only to "active" icons (a liked heart, a bookmarked post, a checked box, etc.), so those stay solid regardless of the chosen weight.

Settings

  • weight — the Phosphor weight to apply (light, regular, bold, duotone).
  • ignored_icons — Font Awesome icons to leave untouched (keeps the default icon instead of the Phosphor replacement).

Not every Font Awesome icon has a direct Phosphor equivalent. To map additional icons, see Replace Discourse's default SVG icons with custom icons in a theme.

Developing

The Font Awesome → Phosphor mappings live in javascripts/discourse/lib/icon-map.js (used both at runtime by the initializer and at build time). After editing them, regenerate the sprite from @phosphor-icons/core:

pnpm install
pnpm build

pnpm build runs scripts/generate-sprite.mjs, which writes assets/icons-sprite.svg. The initializer (javascripts/discourse/api-initializers/phosphor-icons.js) is a regular source file — no codegen.

Attribution

This theme component includes icon assets from Phosphor Icons.

See LICENSE_PHOSPHOR for the Phosphor license text.

About

Use Phosphor Duotone icons in Discourse

Topics

Resources

Stars

0 stars

Watchers

17 watching

Forks

Releases

Packages

Used by

Contributors

Languages