{"id":47925479,"url":"https://github.com/fzankl/gitbook-plugin-flexible-alerts","last_synced_at":"2026-04-04T06:29:29.079Z","repository":{"id":44159679,"uuid":"164008791","full_name":"fzankl/gitbook-plugin-flexible-alerts","owner":"fzankl","description":"GitBook plugin to convert blockquotes into beautiful and configurable alerts using preconfigured or own styles and alert types.","archived":false,"fork":false,"pushed_at":"2023-07-19T21:00:07.000Z","size":360,"stargazers_count":32,"open_issues_count":3,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-18T01:41:44.190Z","etag":null,"topics":["alert","blockquote","callout","gitbook","gitbook-plugin","hint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fzankl.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-01-03T18:28:54.000Z","updated_at":"2024-09-03T05:47:14.000Z","dependencies_parsed_at":"2024-06-21T03:55:04.983Z","dependency_job_id":"e24be63c-a8a9-4fc3-b89d-23b3499f43e0","html_url":"https://github.com/fzankl/gitbook-plugin-flexible-alerts","commit_stats":null,"previous_names":["zanfab/gitbook-plugin-flexible-alerts"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fzankl/gitbook-plugin-flexible-alerts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzankl%2Fgitbook-plugin-flexible-alerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzankl%2Fgitbook-plugin-flexible-alerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzankl%2Fgitbook-plugin-flexible-alerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzankl%2Fgitbook-plugin-flexible-alerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fzankl","download_url":"https://codeload.github.com/fzankl/gitbook-plugin-flexible-alerts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fzankl%2Fgitbook-plugin-flexible-alerts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31390165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["alert","blockquote","callout","gitbook","gitbook-plugin","hint"],"created_at":"2026-04-04T06:29:28.430Z","updated_at":"2026-04-04T06:29:29.068Z","avatar_url":"https://github.com/fzankl.png","language":"JavaScript","readme":"# GitBook plugin: Flexible Alerts\n\n![Build Status](https://github.com/fzankl/gitbook-plugin-flexible-alerts/actions/workflows/main.yml/badge.svg)\n[![npm version](https://img.shields.io/npm/v/gitbook-plugin-flexible-alerts/latest.svg)](https://www.npmjs.com/package/gitbook-plugin-flexible-alerts)\n[![npm Downloads](https://img.shields.io/npm/dt/gitbook-plugin-flexible-alerts.svg)](https://www.npmjs.com/package/gitbook-plugin-flexible-alerts)\n\nThis GitBook plugin converts blockquotes into beautiful alerts. Look and feel can be configured on a global as well as on a alert specific level so output does fit your needs (some examples are shown below). In addition, you can provide own alert types.\n\n![Sample alerts created with plugin 'flexible-alerts'](https://user-images.githubusercontent.com/44210522/50688702-ea774f00-1026-11e9-9281-ca615cb466f5.jpg)\n\n## Installation\n\n### Step #1 - Update book.json file\n\n1. In you gitbook's book.json file, add `flexible-alerts` to plugins list.\n2. In pluginsConfig, configure the plugin so it does fit your needs. A custom setup is not mandatory.\n3. By default style 'callout' and headings 'Note', 'Tip', 'Warning', 'Attention' will be used. You can change it using plugin configuration via `book.json` or for a single alert in your markdown files.\n\n**Sample `book.json` file for gitbook version 2.0.0+**\n\n```json\n{\n  \"plugins\": [\n    \"flexible-alerts\"\n  ]\n}\n```\n\n**Sample `book.json` file for gitbook version 2.0.0+ and style `flat` instead of `callout`**\n\n```json\n{\n  \"plugins\": [\n    \"flexible-alerts\"\n  ],\n  \"pluginsConfig\": {\n    \"flexible-alerts\": {\n      \"style\": \"flat\"\n    }\n  }\n}\n```\n\n**Sample `book.json` file for gitbook version 2.0.0+ and custom headings**\n\n```json\n{\n  \"plugins\": [\n    \"flexible-alerts\"\n  ],\n  \"pluginsConfig\": {\n    \"flexible-alerts\": {\n      \"note\": {\n        \"label\": \"Hinweis\"\n      },\n      \"tip\": {\n        \"label\": \"Tipp\"\n      },\n      \"warning\": {\n        \"label\": \"Warnung\"\n      },\n      \"danger\": {\n        \"label\": \"Achtung\"\n      }\n    }\n  }\n}\n```\n\n**Sample `book.json` file for gitbook version 2.0.0+  and multilingual headings**\n\n```json\n{\n  \"plugins\": [\n    \"flexible-alerts\"\n  ],\n  \"pluginsConfig\": {\n    \"flexible-alerts\": {\n      \"note\": {\n        \"label\": {\n          \"de\": \"Hinweis\",\n          \"en\": \"Note\"\n        }\n      },\n      \"tip\": {\n        \"label\": {\n          \"de\": \"Tipp\",\n          \"en\": \"Tip\"\n        }\n      },\n      \"warning\": {\n        \"label\": {\n          \"de\": \"Warnung\",\n          \"en\": \"Warning\"\n        }\n      },\n      \"danger\": {\n        \"label\": {\n          \"de\": \"Achtung\",\n          \"en\": \"Attention\"\n        }\n      }\n    }\n  }\n}\n```\n\nNote: Above snippets can be used as complete `book.json` file, if one of these matches your requirements and your book doesn't have one yet.\n\n### Step #2 - gitbook commands\n\n1. Run `gitbook install`. It will automatically install `flexible-alerts` gitbook plugin for your book. This is needed only once.\n2. Build your book (`gitbook build`) or serve (`gitbook serve`) as usual.\n\n## Usage\n\nTo use the plugin just modify an existing blockquote and prepend a line matching pattern `[!type]`. By default types `NOTE`, `TIP`, `WARNING` and `DANGER` are supported. You can extend the available types by providing a valid configuration (see below for an example).\n\n```markdown\n\u003e [!NOTE]\n\u003e An alert of type 'note' using global style 'callout'.\n```\n\n```markdown\n\u003e [!NOTE|style:flat]\n\u003e An alert of type 'note' using alert specific style 'flat' which overrides global style 'callout'.\n```\n\nAs you can see in the second snippet, output can be configured on alert level also. Supported options are listed in following table:\n\n| Key            | Allowed value |\n| --------------- | ---- |\n| style | One of follwowing values: callout, flat |\n| label  | Any text |\n| icon  | A valid Font Awesome icon, e.g. 'fa fa-info-circle' |\n| className  | A name of a CSS class which specifies the look and feel |\n| labelVisibility | One of follwowing values: visible (default), hidden |\n| iconVisibility  | One of follwowing values: visible (default), hidden |\n\nMultiple options can be used for single alerts as shown below:\n\n```markdown\n\u003e [!TIP|style:flat|label:My own heading|iconVisibility:hidden]\n\u003e An alert of type 'tip' using alert specific style 'flat' which overrides global style 'callout'.\n\u003e In addition, this alert uses an own heading and hides specific icon.\n```\n\n![Custom alert](https://user-images.githubusercontent.com/44210522/50689970-04676080-102c-11e9-9cbc-8af129cb988c.png)\n\nAs mentioned above you can provide your own alert types. Therefore, you have to provide the type configuration via `book.json`. Following example shows an additional type `COMMENT`.\n\n```json\n{\n  \"plugins\": [\n    \"flexible-alerts\"\n  ],\n  \"pluginsConfig\": {\n    \"flexible-alerts\": {\n      \"style\": \"callout\",\n      \"comment\": {\n        \"label\": \"Comment\",\n        \"icon\": \"fa fa-comments\",\n        \"className\": \"info\"\n      }\n    }\n  }\n}\n```\n\nIn Markdown just use the alert according to the types provided by default.\n\n```markdown\n\u003e [!COMMENT]\n\u003e An alert of type 'comment' using style 'callout' with default settings.\n```\n\n![Custom alert type 'comment'](https://user-images.githubusercontent.com/44210522/50722960-6f21a600-10d7-11e9-87e7-d40d87045afe.png)\n\n## Troubleshooting\n\nIf alerts do not look as expected, check if your `book.json` as well as alerts in Markdown are valid according to this documentation.\n\n## Changelog\n\n08/15/2022 - Fixed code smell in stylesheet file and updated development dependencies\n\n04/08/2019 - Fixed issue concerning languages using characters others than [a-z,A-Z,0-9] like Chinese or Russian\n\n02/24/2019 - Added support for Internet Explorer 11\n\n01/07/2019 - Moved complete icon definition to pluginsConfig section\n\n01/05/2019 - Initial Release\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzankl%2Fgitbook-plugin-flexible-alerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffzankl%2Fgitbook-plugin-flexible-alerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffzankl%2Fgitbook-plugin-flexible-alerts/lists"}