Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed May 21, 2024
1 parent 25c2dc2 commit dfb5b57
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use Setono\TagBag\Renderer\ElementRenderer;
use Setono\TagBag\Tag\InlineScriptTag;
use Setono\TagBag\TagBag;

$tagBag = new TagBag(new ElementRenderer());
$tagBag = new TagBag();

// in a controller or service
$tagBag->add(InlineScriptTag::create('trackSomething();'));
Expand Down Expand Up @@ -160,22 +160,17 @@ If you're using Google's services, some of them allow you to track events using
To make it easier to create these tags, you can use the [gtag extension for the tag bag](https://github.com/Setono/tag-bag-gtag).

## Renderers
The base library contains three renderers that corresponds to the base tags.
A renderer implements the `RendererInterface`.
The base library contains two renderers. A renderer implements the `RendererInterface`.

Just as with the tags there are also renderers in the sub packages.

**Content renderer**

The `ContentRenderer` renders the content you've input in the tag.

**Script renderer**
**Element renderer**

The `ScriptRenderer` wraps the content in a `<script>` tag.

**Style renderer**

The `StyleRenderer` wraps the content in a `<style>` tag.
The `ElementRenderer` renders 'element tag', e.g. `<script>`, `<style>`, `<meta>`, `<link>`, all tags based on HTML elements basically.

## Storage

Expand Down

0 comments on commit dfb5b57

Please sign in to comment.