Humble.Umbraco.SvgHelpers 13.0.0.1

Prefix Reserved
dotnet add package Humble.Umbraco.SvgHelpers --version 13.0.0.1                
NuGet\Install-Package Humble.Umbraco.SvgHelpers -Version 13.0.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Humble.Umbraco.SvgHelpers" Version="13.0.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Humble.Umbraco.SvgHelpers --version 13.0.0.1                
#r "nuget: Humble.Umbraco.SvgHelpers, 13.0.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Humble.Umbraco.SvgHelpers as a Cake Addin
#addin nuget:?package=Humble.Umbraco.SvgHelpers&version=13.0.0.1

// Install Humble.Umbraco.SvgHelpers as a Cake Tool
#tool nuget:?package=Humble.Umbraco.SvgHelpers&version=13.0.0.1                

SVG Helpers

This code provides a comprehensive solution for rendering SVG icons from both the Umbraco backoffice and the file system while efficiently caching them in memory. It also generates a combined SVG sprite for improved performance and reusability in web applications.

TLDR;

Step 1: Use SVGs in your Razor Code

Render a Backoffice Icon:

<humble-icon name="facebook" />

Render a SVG File:

<humble-icon path="~/icons/1password.svg" />

Render all SVG Files in a Folder:

<humble-icon directory="~/my-icon-folder"></humble-icon>

Step 2: Ensure the SVG Symbols are Rendered

Render the SVG Sprite Directly:

<humble-sprite />

Setup and Configuration

Setup and configuration is a two-step process. After performing these steps, the tag helpers (mentioned above) will be available for use.

  1. Install Humble.Umbraco.SvgHelpers:
dotnet add package Humble.Umbraco.SvgHelpers
  1. Register the Tag Helpers in your _ViewImports.cshtml file:
...

@addTagHelper *, Humble.Umbraco.SvgHelpers

...

How to Find Support

  1. Use GitHub Issues to report bugs.
  2. Use GitHub Discussions to ask questions, provide feedback, and make suggestions.
  3. Consider hiring our agency, Next Player Up, for your next project—innovative apps, immersive XR experiences, and AI solutions that'll exceed your expectations, not your budget. We are also a Umbraco Certified Gold Partner!

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

License information was last updated May 19th, 2024.

Release History

13.0.0.1

  • SVG files were looked up using WebRootPath, this has been changed to use ContentRootPath so that files do not need to be included in /wwwroot/.

13.0.0.0

  • For Umbraco v13.x.x
  • Render SVGs from the Umbraco Backoffice and file system with ease.
  • Generates symbols so a single SVG icon can be referenced multiple times throughout your design.

You've reached the end of readme.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
13.0.0.1 230 5/22/2024
13.0.0 112 5/19/2024