{"id":24764072,"url":"https://github.com/stillat/statamic-bard-heading-permalinks","last_synced_at":"2025-08-09T02:25:44.817Z","repository":{"id":206691368,"uuid":"717481094","full_name":"Stillat/statamic-bard-heading-permalinks","owner":"Stillat","description":"Provides a permalink extension for Bard that is compatible with Statamic's markdown settings.","archived":false,"fork":false,"pushed_at":"2024-05-11T20:05:49.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-18T12:53:07.322Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Stillat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"JohnathonKoster"}},"created_at":"2023-11-11T15:52:47.000Z","updated_at":"2024-12-03T09:16:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"cf566302-9bde-45dc-9e9d-9553a2c5cd34","html_url":"https://github.com/Stillat/statamic-bard-heading-permalinks","commit_stats":null,"previous_names":["stillat/statamic-bard-heading-permalinks"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stillat%2Fstatamic-bard-heading-permalinks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stillat%2Fstatamic-bard-heading-permalinks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stillat%2Fstatamic-bard-heading-permalinks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stillat%2Fstatamic-bard-heading-permalinks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stillat","download_url":"https://codeload.github.com/Stillat/statamic-bard-heading-permalinks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236092363,"owners_count":19093623,"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":[],"created_at":"2025-01-28T21:32:22.689Z","updated_at":"2025-01-28T21:32:36.989Z","avatar_url":"https://github.com/Stillat.png","language":"PHP","funding_links":["https://github.com/sponsors/JohnathonKoster"],"categories":[],"sub_categories":[],"readme":"# Bard Heading Permalinks for Statamic\n\nBard Heading Permalinks is an addon for Statamic that can add permalinks automatically to headings, similar to how permalinks can be added to markdown content.\n\n## How to Install\n\nTo install Bard Heading Permalinks run the following command from the root of your project:\n\n``` bash\ncomposer require stillat/statamic-bard-heading-permalinks\n```\n\n## How to Use\n\nOnce installed you will need to register the Bard extensions provided by this addon. This is typically done within your site's `AppServiceProvider`.\n\nBard Heading Permalinks provides two different extensions:\n\n* `Permalink`: Responsible for rendering the embedded link within headings\n* `HeadingPermalinkExtension`: Adds the permalink, and any other details to rendered headings\n\nFor convenience, both extensions may be registered at once:\n\n```php\n\u003c?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\nuse Stillat\\StatamicBardHeadingPermalinks\\HeadingPermalinkExtension;\n\nclass AppServiceProvider\n{\n    public function boot()\n    {\n        // Register all heading permalink extensions.\n        HeadingPermalinkExtension::registerAll();\n    }\n}\n```\n\n\u003e Note: The `HeadingPermalinkExtension` will replace any existing heading extension.\n\n## Configuration\n\nBy default, Bard Heading Permalinks will utilize the `heading_permalink` settings for the *default* markdown parser. For more information on configuring Statamic's markdown parsers, consider reading the official documentation here: [https://statamic.dev/extending/markdown#configuration](https://statamic.dev/extending/markdown#configuration).\n\nHowever, you may publish Bard Heading Permalink's configuration file to override any settings by running the following command from the root of your project:\n\n```bash\nphp artisan vendor:publish --tag=bard-permalinks-config\n```\n\nA new file will be created at `config/bard_permalinks.php`, with the following contents:\n\n```php\n\u003c?php\n\nuse League\\CommonMark\\Extension\\HeadingPermalink\\HeadingPermalinkRenderer;\n\nreturn [\n    'config' =\u003e [\n        'html_class' =\u003e config('statamic.markdown.configs.default.heading_permalink.html_class', 'heading-permalink'),\n        'id_prefix' =\u003e config('statamic.markdown.configs.default.heading_permalink.id_prefix', 'content'),\n        'apply_id_to_heading' =\u003e config('statamic.markdown.configs.default.heading_permalink.apply_id_to_heading', false),\n        'heading_class' =\u003e config('statamic.markdown.configs.default.heading_permalink.heading_class', ''),\n        'fragment_prefix' =\u003e config('statamic.markdown.configs.default.heading_permalink.fragment_prefix', 'content'),\n        'insert' =\u003e config('statamic.markdown.configs.default.heading_permalink.insert', 'before'),\n        'min_heading_level' =\u003e config('statamic.markdown.configs.default.heading_permalink.min_heading_level', 1),\n        'max_heading_level' =\u003e config('statamic.markdown.configs.default.heading_permalink.max_heading_level', 6),\n        'title' =\u003e config('statamic.markdown.configs.default.heading_permalink.title', 'Permalink'),\n        'symbol' =\u003e config('statamic.markdown.configs.default.heading_permalink.symbol', HeadingPermalinkRenderer::DEFAULT_SYMBOL),\n        'aria_hidden' =\u003e config('statamic.markdown.configs.default.heading_permalink.aria_hidden', true),\n    ],\n];\n\n```\n\nBard Heading Permalinks supports all documented configuration options provided by CommonMark's Heading Permalink Extension. For more information on each configuration option, please consult their documentation page here: [https://commonmark.thephpleague.com/2.4/extensions/heading-permalinks/](https://commonmark.thephpleague.com/2.4/extensions/heading-permalinks/).\n\n## License\n\nBard Heading Permalinks is free software, released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstillat%2Fstatamic-bard-heading-permalinks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstillat%2Fstatamic-bard-heading-permalinks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstillat%2Fstatamic-bard-heading-permalinks/lists"}