{"id":13718918,"url":"https://github.com/martignoni/hugo-notice","last_synced_at":"2025-04-06T06:09:48.008Z","repository":{"id":36010714,"uuid":"173473490","full_name":"martignoni/hugo-notice","owner":"martignoni","description":"A Hugo theme component to display nice notices","archived":false,"fork":false,"pushed_at":"2024-07-07T10:56:03.000Z","size":513,"stargazers_count":238,"open_issues_count":2,"forks_count":48,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-10-12T02:07:06.899Z","etag":null,"topics":["hugo","hugo-theme-component","multilingual","notice"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martignoni.png","metadata":{"files":{"readme":"README.md","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":"2019-03-02T16:47:03.000Z","updated_at":"2024-09-27T08:38:25.000Z","dependencies_parsed_at":"2024-01-22T08:31:15.762Z","dependency_job_id":"20d21099-8694-469e-8634-a33868ab438d","html_url":"https://github.com/martignoni/hugo-notice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martignoni%2Fhugo-notice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martignoni%2Fhugo-notice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martignoni%2Fhugo-notice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martignoni%2Fhugo-notice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martignoni","download_url":"https://codeload.github.com/martignoni/hugo-notice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441053,"owners_count":20939239,"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","hugo-theme-component","multilingual","notice"],"created_at":"2024-08-03T01:00:39.463Z","updated_at":"2025-04-06T06:09:47.978Z","avatar_url":"https://github.com/martignoni.png","language":"HTML","funding_links":[],"categories":["HTML","Theme Components"],"sub_categories":["Non-Official"],"readme":"# hugo-notice\n\n[![Awesome](https://awesome.re/badge.svg)](https://github.com/budparr/awesome-hugo)\n\n## About\n\nA [Hugo](https://gohugo.io) theme component providing a shortcode: `notice` to display nice notices, and supporting dark mode.\n\nSeveral sets of icons are provided too: make your choice second your taste!\n\nFour notice types are provided: `warning`, `info`, `note` and `tip`.\n\nThis component comes with __localization in 18 languages__: English, French, German, Italian, Portuguese, Spanish, Chinese, Russian, Turkish, Arabic, Polish, Finnish, Korean, Vietnamese, Swahili, Japanese, Chinese (Taiwan) and Swedish.\n\nOther languages welcome! Send your pull request.\n\n![Screenshot](screenshot.png)\n\n## Installation\n\n### As a Hugo module\n\n1. Initialize your existing site as hugo module\n\n    ```shell\n    hugo mod init github.com/USERNAME/REPO\n    ```\n\n2. Add the `hugo-notice` as a hugo module to be able to get upstream changes later\n\n    ```shell\n    hugo mod get github.com/martignoni/hugo-notice\n    ```\n\n3. In your site's or theme's configuration file `hugo.yaml` or `hugo.toml`, add a new `module` section and define both `hugo-notice` and your currently used theme as modules to be imported.\n\n    Example, with `hugo.yaml`:\n    ```yaml\n    module:\n      imports:\n        - path: github.com/martignoni/hugo-notice\n        - path: my-theme\n    ```\n    or, with `hugo.toml`,\n    ```toml\n    [module]\n      [[module.imports]]\n        path = \"github.com/martignoni/hugo-notice\"\n      [[module.imports]]\n        path = \"my-theme\"\n    ```\n\n### As a Git submodule\n\n1. Add the `hugo-notice` as a submodule to be able to get upstream changes later `git submodule add https://github.com/martignoni/hugo-notice.git themes/hugo-notice`\n\n2. Add `hugo-notice` as the left-most element of the `theme` list variable in your site's or theme's configuration file `hugo.yaml` or `hugo.toml`.\n\n   Example, with `hugo.yaml`:\n    ```yaml\n    theme: [\"hugo-notice\", \"my-theme\"]\n    ```\n    or, with `hugo.toml`,\n    ```toml\n    theme = [\"hugo-notice\", \"my-theme\"]\n    ```\n## Usage\n\nIn your site, use the shortcode, this way:\n```go\n{{\u003c notice warning \u003e}}\nThis is a warning notice. Be warned!\n{{\u003c /notice \u003e}}\n```\nor\n```go\n{{\u003c notice tip \u003e}}\nThis is a very good tip.\n{{\u003c /notice \u003e}}\n```\n\n### Enabling dark mode\n\nWe recommend that you use the standard [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS media feature to detect if a user has requested light or dark color themes. In this case, dark mode will work automatically. The `prefers-color-scheme` media feature is fully supported by all modern browsers.\n\nAnother way to make it work is to inject (e.g. via Javascript) the class `dark` into the `body` element of your pages when dark mode is needed.\n\n### Changing icon set\n\nJust copy the icons from one of the subfolders of folder `icons/` into folder `icons/`.\n\nAny __solid__ SVG icons can be used. If you want to contribute your open licensed icons, your pull request is welcome.\n\n## Acknowledgements\n\nCopyright © 2019 onwards, Nicolas Martignoni nicolas@martignoni.net.\n\n### Localization\n\nThanks to\n- [Geraldo Ribeiro](https://github.com/geraldolsribeiro) for the Portuguese localization.\n- [thatrocketx](https://github.com/thatrocketx) for the Italian localization.\n- [casaqori](https://github.com/casaqori) for the Spanish localization.\n- [理头张](https://github.com/qidongz) for the Chinese localization.\n- [Алексей Корнеев](https://github.com/korney4eg) for the Russian localization.\n- [Ahmad Al Maaz](https://github.com/Music47ell) for the Turkish and Arabic localizations.\n- [Rafal S.](https://github.com/sulik76) for the Polish localization.\n- [Oskari J. Manninen](https://github.com/x7Gv) for the Finnish localization.\n- [Haseop Lee](https://github.com/haservi) for the Korean localization.\n- [Bùi Nguyễn Hoàng Thọ](https://discourse.gohugo.io/u/hoangtho97/summary) for the Vietnamese localization.\n- [callaloo](https://github.com/callaloo) for the Swahili localization.\n- [kevinzch](https://github.com/kevinzch) for the Japanese and Chinese (Taiwan) localizations.\n- [mcfrojd](https://github.com/mcfrojd) for the Swedish localization.\n\n### Development\n\nThanks to\n- [Gary Tai](https://github.com/gary-tai) for raising a nasty spacing bug.\n- [Dephilia](https://github.com/Dephilia) for suggesting and implementing dark mode.\n- [RoneoOrg](https://github.com/RoneoOrg) for implementing default notice type.\n- [Andreas Deininger](https://github.com/deining) for installation as a Hugo module How To.\n- [rea1shane](https://github.com/rea1shane) for suggesting and implementing a few useful features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartignoni%2Fhugo-notice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartignoni%2Fhugo-notice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartignoni%2Fhugo-notice/lists"}