reuixiy / hugo-theme-meme

😝 You can’t spell awesome without MemE!
https://io-oi.me/hugo-theme-meme
MIT License
1.01k stars 279 forks source link

Add font awesome icon support #415

Open Catoverflow opened 1 year ago

Catoverflow commented 1 year ago

I found pre-defined icons hard-coded in data/SVG.toml, they seems to be manually exported from font-awesome or other sources.

For example:

home = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" class="icon"><path d="M280.37 148.26L96 300.11V464a16 16 0 0 0 16 16l112.06-.29a16 16 0 0 0 15.92-16V368a16 16 0 0 1 16-16h64a16 16 0 0 1 16 16v95.64a16 16 0 0 0 16 16.05L464 480a16 16 0 0 0 16-16V300L295.67 148.26a12.19 12.19 0 0 0-15.3 0zM571.6 251.47L488 182.56V44.05a12 12 0 0 0-12-12h-56a12 12 0 0 0-12 12v72.61L318.47 43a48 48 0 0 0-61 0L4.34 251.47a12 12 0 0 0-1.6 16.9l25.5 31A12 12 0 0 0 45.15 301l235.22-193.74a12.19 12.19 0 0 1 15.3 0L530.9 301a12 12 0 0 0 16.9-1.6l25.5-31a12 12 0 0 0-1.7-16.93z"/></svg>'

Could you please add font-awesome support, and I can use their icon class (like fa-solid fa-house) directly instead of maintaining an hard-coded icon list myself? I'm not familiar with frontend development but I think this will work well.

Thanks

jalenzz commented 1 year ago

@Catoverflow You can creat ~/data/SVG.toml just add icon you want in it, the forma should like ~/theme/data/SVG.toml