Skip to content

Commit

Permalink
feat: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
simonerd committed Apr 13, 2023
1 parent 7cfc09c commit 6f7fce5
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Statamic Anchor Navigation

> Statamic Anchor Navigation is a Statamic addon that helps you build a server side anchor navigation from your bard content.
A Statamic addon that provides a custom tag for creating an anchor nav for all headings generated by the bard editor.

## Features

This addon does:
- Extends the TipTap heading node and adds a slugified ID to all configured heading levels (defaults to h2).
- The `{{ anchor_navigation }}` tag makes it easy to build an anchor navigation for all headings within your bard content.

- Extends the TipTap Heading Node and adds a slugified ID to all heading levels of your choice.
- The 'anchor_navigation'-tag makes it easy to build an anchor navigation from headings in your bard content.

## How to Install
## How to install

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

``` bash
composer require visuellverstehen/statamic-anchor-navigation
```

## How to Use
## How to use

Include the anchor_navigation tag in your template and provide it with the field handle of your bard field.
Include the `{{ anchor_navigation }}` tag in your template and supply the field handle of your bard field.
```
<ul>
{{ anchor_navigation from="bard" }}
Expand All @@ -32,10 +30,17 @@ Include the anchor_navigation tag in your template and provide it with the field

## Configurations

You can define which heading levels should be included in your anchor navigation.
Level 2 headings are set as a default.
You can define which heading levels should be included in your anchor navigation. Level 2 headings are set as a default.
```
'heading' => [
'levels' => [2],
],
```

## More about us

- [www.visuellverstehen.de](https://visuellverstehen.de)

## License
The MIT license (MIT). Please take a look at the [license file](LICENSE.md) for more information.

0 comments on commit 6f7fce5

Please sign in to comment.