Skip to content

Commit

Permalink
feat(README): adds markdown-inject
Browse files Browse the repository at this point in the history
closes #11
  • Loading branch information
bmuenzenmeyer committed Feb 25, 2023
1 parent 2483631 commit ebc316e
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 11 deletions.
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,40 @@ This plugin comes with two mechanisms to create an inline link favicon. You can

### Paired Shortcode

```md
<!-- CODEBLOCK_START {"value": "demo/paired-shortcode.njk", "hideValue": true} -->
<!-- prettier-ignore -->
~~~~~~~~~~njk
{% ai "https://front-end.social/@brian" %}@brian{% endai %}
```
~~~~~~~~~~

<!-- CODEBLOCK_END -->

returns

```html
<!-- CODEBLOCK_START {"value": "_site/demo/paired-shortcode/index.html", "hideValue": true} -->
<!-- prettier-ignore -->
~~~~~~~~~~html
<a href="https://front-end.social/@brian"
><img
style="max-height: 1em; position: relative; top: .2em; margin-right: .2em"
src="https://t1.gstatic.com/faviconV2?client=SOCIAL&amp;type=FAVICON&amp;fallback_opts=TYPE,SIZE,URL&amp;url=https://front-end.social/@brian&amp;size=1"
alt="favicon for https://front-end.social/@brian"
loading="lazy"
style="max-height: 1em; position: relative; top: 0.2em; margin-right: 0.2em"
src="https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://front-end.social/@brian&size=128"
/>@brian</a
>
```
~~~~~~~~~~

<!-- CODEBLOCK_END -->

### Filter

```md
<!-- CODEBLOCK_START {"value": "demo/filter.njk", "hideValue": true} -->
<!-- prettier-ignore -->
~~~~~~~~~~njk
{{ "https://front-end.social/@brian" | ai("@brian") | safe }}
```
~~~~~~~~~~

<!-- CODEBLOCK_END -->

returns the same as above.

Expand Down
1 change: 1 addition & 0 deletions demo/filter.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ "https://front-end.social/@brian" | ai("@brian") | safe }}
1 change: 1 addition & 0 deletions demo/paired-shortcode.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% ai "https://front-end.social/@brian" %}@brian{% endai %}
Loading

0 comments on commit ebc316e

Please sign in to comment.