iconはicomoonでsvgではなくfontアイコンにしてfontsフォルダに入れました。
svgも考えましたが、IEが部分適用で完全サポートになっていないのでやめました。
{{% internal_link href="リンクアドレス" text="文字列" %}}
<a href="{{ .Get "href" }}" class="icon-link">{{ .Get "text" }}</a>
通常のMarkdownでは
[テキスト](url)
こちらになります。jQueryなどのaddClass
などを使っても良いのですがshortcode
の方が便利だと思いこちらを作成してみました。
Markdown記述の際に少々面倒ではありますが、jQuery使って予期せぬことになるより静的(ビルド時に生成されるため)なので良いと思います。
classの指定をしていますのでcssで修飾が可能です。