{"id":19876379,"url":"https://github.com/foo-dogsquared/hugo-mod-simple-icons","last_synced_at":"2025-05-02T11:32:29.400Z","repository":{"id":56415636,"uuid":"307454109","full_name":"foo-dogsquared/hugo-mod-simple-icons","owner":"foo-dogsquared","description":"A Hugo module for the Simple Icons icon set.","archived":false,"fork":false,"pushed_at":"2024-05-22T23:19:58.000Z","size":78,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-23T00:28:12.885Z","etag":null,"topics":["hugo-mod","hugo-module","simple-icons"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foo-dogsquared.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-26T17:34:25.000Z","updated_at":"2024-05-30T01:49:29.748Z","dependencies_parsed_at":"2023-02-02T23:46:35.829Z","dependency_job_id":"3ef58766-2e9a-4823-a04d-6251e1a02563","html_url":"https://github.com/foo-dogsquared/hugo-mod-simple-icons","commit_stats":null,"previous_names":[],"tags_count":108,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-dogsquared%2Fhugo-mod-simple-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-dogsquared%2Fhugo-mod-simple-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-dogsquared%2Fhugo-mod-simple-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-dogsquared%2Fhugo-mod-simple-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foo-dogsquared","download_url":"https://codeload.github.com/foo-dogsquared/hugo-mod-simple-icons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224308956,"owners_count":17290096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hugo-mod","hugo-module","simple-icons"],"created_at":"2024-11-12T16:32:51.671Z","updated_at":"2024-11-12T16:32:53.247Z","avatar_url":"https://github.com/foo-dogsquared.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"= hugo-mod-simple-icons\n:toc:\n\n\nA https://gohugo.io/hugo-modules/theme-components/#readout[Hugo theme component] for https://github.com/simple-icons/simple-icons/[Simple Icons] , a free and open source icon set for popular brands.\nThis module enables you to use the icons without getting the icons yourself.\n\nYou can still use the icon set with NPM and seeing that Hugo is https://gohugo.io/news/0.75.0-relnotes/[getting more support for JavaScript-based workflows] (and https://discourse.gohugo.io/t/esbuild-looks-like-we-can-finally-get-solid-hugo-modules-support/28757[more in the future]).\nEven so, this module is good if you don't want to install additional tooling.\n\nNOTE: The following example snippets are in TOML format.\nBe sure to convert it first into the appropriate format if you're using other than TOML.\n\n\n\n\n== Getting started\n\nAs a prerequisite, you need Hugo v0.56 and above (as long as it has the Hugo module feature) and the latest version of https://golang.org/dl/[Go].\n\nFirst, you need to initialize your Hugo project as a Hugo module.\nThis can be done by running `hugo mod init $HUGO_MODULE_PATH`.\n\nThen, you can import the Hugo module in your site config.\n\n[source, toml]\n----\n[[module.imports]]\n  path = \"github.com/foo-dogsquared/hugo-mod-simple-icons\"\n----\n\nYou can also specify the tag by adding `@$TAG` at the end of the path.\nThe versioning scheme of this module follows the project — e.g., for link:https://github.com/simple-icons/simple-icons/releases/tag/6.7.0[Simple Icons v6.7.0], you can find a version of the module that has \"v6.7.0\".\nThe format of the tags of the module is \"v${VERSION}\".\nFor more information, you can see https://github.com/golang/go/wiki/Modules#how-to-upgrade-and-downgrade-dependencies[how to specify Go modules] since Hugo modules are built on top of it.\n\nNext, get the dependency by running `hugo mod get` and to update the component, run `hugo mod get -u`.\n(You could also run the server [i.e., `hugo server`] to download the modules.)\n\nTo get the list of icons, simply view the https://simpleicons.org/[website], https://github.com/simple-icons/simple-icons/tree/develop/icons[see the icons folder from the source itself], and/or search within the repo.\n\n\n=== Using it in the Hugo site\n\nNow that you have the theme component in the Hugo project, you have to actually use it.\nBy default, the theme component has the following configuration:\n\n* Icon set is available at `assets/svg/simple-icons` for https://gohugo.io/hugo-pipes/introduction/[interacting with resources].\nFrom there, you can then get the icon with a simple `resources.Get`.\n\n* The Simple Icons dataset is available as `data/simple-icons.json` in https://gohugo.io/templates/data-templates/#the-data-folder[the data folder] where you can use it (at `$.Site.Data.simple-icons`) to create https://gohugo.io/templates/data-templates/[data templates].\n\nThe following shows how to get an icon from the set.\n\n[source, go]\n----\n{{ $icon := resources.Get \"svg/simple-icons/github.svg\" }}\n{{ $icon.Content | safeHTML }}\n----\n\n\n\n\n== License\n\nThe Hugo theme component is licensed under MIT license.\nPlease see the link:./LICENSE[license file] for the full text.\n\nThe Simple Icons icon set is licensed under https://creativecommons.org/publicdomain/zero/1.0/[Creative Commons Zero 1.0 Universal Public Domain].\nSee the https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md[related file] for the full details.\n\n\n\n\n== Development guidelines\n\nMaintaining this module is quite simple.\nOne of the main core tasks of maintaining this module is simply updating the module to use the latest version of the icon set.\nIt can be done with `hugo mod get ${SIMPLE_ICONS_GIT_URL}@${COMMIT}` where the commit is the latest commit hash of the repository.\nThen tidy the related files with `hugo mod tidy` and you're done.\nFortunately, this can be automated with simple tools and services like the link:https://docs.github.com/en/free-pro-team@latest/rest[GitHub API] and link:https://stedolan.github.io/jq/[jq] which I've created one in the link:./Makefile[Makefile].\nIt does need link:https://curl.se/[curl], link:https://stedolan.github.io/jq/[jq], and link:https://www.gnu.org/software/make/[GNU Make] (of course) for this to work.\n\nThe documentation uses link:https://asciidoctor.org/[Asciidoctor]-flavored Asciidoc as the format.\nThe Asciidoctor toolchain is not necessary to install, you just need to know the formatting syntax of it.\n\nIf you have link:https://nixos.org/[Nix] installed, you can easily set up the same development environment that I use by running `nix-shell shell.nix` or `nix develop` if you have Nix flakes feature enabled.\n\nTIP: You can make setting up the development environment even easier with link:https://direnv.net/[direnv] along with Nix.\nJust add `echo \"use nix\" \u003e .envrc \u0026\u0026 direnv allow` in the project root and you're good to go!\n\n\n\n\n== Acknowledgements\n\n* The maintainers of https://github.com/simple-icons/[Simple Icons] for keeping the icon set top notch.\n* The team and community behind https://gohugo.io/[Hugo] for creating a great project that is maintained in top condition for a very long time.\n* The maintainers of https://github.com/gohugoio/hugo-mod-bootstrap-scss-v4[Bootstrap v4 Hugo module] as a template for the Hugo module thing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo-dogsquared%2Fhugo-mod-simple-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoo-dogsquared%2Fhugo-mod-simple-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo-dogsquared%2Fhugo-mod-simple-icons/lists"}