Carver plugin for Kirby 3

Introducing Carver, a plugin that allows you to write your own custom tags (not to be confused with Kirby Tags - they are not the same).

This is a really early version, do not use in production, it needs work!! Feel free to help out if you can, this has endless possibilties!

Wait?? What! Custom Tags??

Yep. you heard… because this:

<time class="mytime">
  <?php echo $page->date()->toDate('d/m/Y') ?>
</time>

Is harder to read than this…

<kb:date format="d/m/Y" field="date" wraptag="time" class="mytime" />

More details over in the repo…

I’ve added a tag library over here (more tags to come).

If anyone can help with this issue, I would be grateful…

So i’ve got over the above problems and I’m having fun making built in tags for it. Currently stands at these for starters… if you have an idea for a built tag, leave a comment :slight_smile:

<!-- Render a gist -->
<kb:gist url="https://gist.github.com/bastianallgeier/b79615a9f7ca76c810b7" />

<!-- Render a youtube video -->
<kb:youtube url="https://www.youtube.com/watch?v=VcjzHMhBtf0" width="100%" height="450px" autoplay="1" loop="1" />

<!-- Render a vimeo video -->
<kb:vimeo url="https://vimeo.com/324963776" width="100%" height="450px" autoplay="1" loop="1" autopause="0" />

<!-- Render an iframe -->
<kb:iframe url="https://getkirby.com" width="100%" height="400px" wraptag="div" class="iframecontent" wrapclass="iframecontainer" />

<!-- Render a link -->
<kb:a href="https://hashandsalt.com" class="mylink" rel="nofollow" />

<!-- Title -->
<kb:title field="title" wraptag="h1" />

<!-- Kirbytext from a field -->
<kb:kt field="text" />

<!-- Obfusifcated Email Link -->
<kb:email field="email" text="Email us today" class="mail" />

<!-- Images from a field, wrapped in a container tag and items wrapped in a tag each -->
<kb:images class="images" field="gallery" wraptag="ul" breaktag="li" />

<!-- Single image by name -->
<kb:image class="myimage" file="lw31n7hd1i.jpg" />