markhuge MH\n s

Review Microformat

published:

signed with 0x683A22F9469CA4EB

A shortcode implementation of h-review that I use on this site.

Shortcode template:

<div class="h-review">
  <p>
  <a class="p-item h-item" href="{{.Get `url`}}">
    <span class="p-name">{{.Get "title"}}</span>
  </a>
  <data class="p-rating" value="{{.Get `rating`}}">{{ "★" | strings.Repeat (.Get "rating") }}</data>
  </p>

  <div class="e-content">
    {{.Inner}}
  </div>
</div>

Usage:

{{% review title="A thing" url="https://a.thing" rating="3" %}}
  The thing was ok.
{{% /review %}}

Output:

A thing ★★★

The thing was ok.

About the Author

Mark Wilkerson

0x683A22F9469CA4EB

R&D engineer @ Twitch. Previously Blizzard, Hightail, Co-Founder @ SpeakUp

Mark is building open source tools to make web3 and decentralized self-ownership easy for regular people.

Live dev streams at Twitch.tv

More Posts