diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-24 20:52:23 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-02-24 20:52:23 +0300 |
commit | 0413a8ce1f001c46784af23e5f461358f3160abf (patch) | |
tree | b3e7f9f357babc892478c2e5c524406b3314c0ce | |
parent | 7e50e358ba21a764a38943d4e3413b8b442dd4cc (diff) |
Make it work
-rw-r--r-- | README.md | 21 | ||||
-rw-r--r-- | config.toml | 5 | ||||
-rw-r--r-- | layouts/partials/heroicon.html | 2 |
3 files changed, 22 insertions, 6 deletions
@@ -4,3 +4,24 @@ Heroicons is a set of free MIT-licensed high-quality SVG icons for you to use in 140 icons per style currently, more to come in the future. See https://github.com/refactoringui/heroicons + +## Use + +Import it into your projec: + +```toml +[[module.imports]] +path = "github.com/gohugoio/hugo-mod-heroicons" +``` + +The icons gets mounted in `assets/svg/heroicons`. + +This means that they can be used like this in a Hugo template: + +```html +{{ $icon := resources.Get "svg/heroicons/outline-md/md-search.svg" }} +{{ $icon.Content | safeHTML }} +``` + + +See https://github.com/refactoringui/heroicons/tree/master/src for a full list of icons.
\ No newline at end of file diff --git a/config.toml b/config.toml index 89bf9d0..3d76466 100644 --- a/config.toml +++ b/config.toml @@ -1,9 +1,6 @@ [module] -[[module.mounts]] -source = "layouts" -target = "layouts" [[module.imports]] -path="github.com/gohugoio/hugo-mod-heroicons" +path="github.com/refactoringui/heroicons" [[module.imports.mounts]] source = "src" target = "assets/svg/heroicons"
\ No newline at end of file diff --git a/layouts/partials/heroicon.html b/layouts/partials/heroicon.html deleted file mode 100644 index 9a7b277..0000000 --- a/layouts/partials/heroicon.html +++ /dev/null @@ -1,2 +0,0 @@ -{{ $icon := resource.Get . }} -<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="{{ $icon.Content }}" />
\ No newline at end of file |