from safeHTML to markdownify

This commit is contained in:
Heydon Pickering 2017-07-10 19:53:24 +01:00
parent f3a726c9c5
commit d6240d36f9
6 changed files with 8 additions and 8 deletions

View File

@ -6,5 +6,5 @@ theme = "infusion"
publishDir = "docs"
[params]
description = "Documentation for the <strong>Infusion</strong> pattern library builder. This documentation is constructed using the builder itself."
description = "Documentation for the **Infusion** pattern library builder. This documentation is constructed using the builder itself."
codePenUser = "Heydon"

View File

@ -33,14 +33,14 @@ baseURL = "https://heydon.github.io/infusion/"
theme = "infusion"
[params]
description = "Documentation for the <strong>Infusion</strong> pattern library builder. This documentation is constructed using the builder itself."
description = "Documentation for the **Infusion** pattern library builder. This documentation is constructed using the builder itself."
codePenUser = "Heydon"
{{</codeBlock>}}
* **title** — This is the library's name, like "Megacorp 5000 Pattern Library". You don't have to include the term "pattern library" if you don't want to. For **Infusion's** own version of **Infusion**, the `title` is, naturally, _Infusion_ :-)
* **baseURL** — This is the root of the live site. Typically you will publish the site to Github Pages, so this should be the base URL for your Github Pages site.
* **theme** — This is the theme the library is using. Don't change this from "infusion".
* **description** — This is a short description of the library and comes under the logo. You can include HTML like `<em>` and `<strong>`.
* **description** — This is a short description of the library and comes under the logo. You can include markdown syntax here, like _&#x002a;&#x002a;Infusion&#x002a;&#x002a;_ in the above example for making the name of the library bold.
* **codePenUser** — If you want to embed codePens in your pattern files, you need to supply a codePen username here.
## Including a logo

View File

@ -269,7 +269,7 @@ baseURL = "https://heydon.github.io/infusion/"
theme = "infusion"
[params]
description = "Documentation for the <strong>Infusion</strong> pattern library builder. This documentation is constructed using the builder itself."
description = "Documentation for the **Infusion** pattern library builder. This documentation is constructed using the builder itself."
codePenUser = "Heydon"
</code></pre>
@ -278,7 +278,7 @@ theme = "infusion"
<li><strong>title</strong> — This is the library&rsquo;s name, like &ldquo;Megacorp 5000 Pattern Library&rdquo;. You don&rsquo;t have to include the term &ldquo;pattern library&rdquo; if you don&rsquo;t want to. For <strong>Infusion&rsquo;s</strong> own version of <strong>Infusion</strong>, the <code>title</code> is, naturally, <em>Infusion</em> :-)</li>
<li><strong>baseURL</strong> — This is the root of the live site. Typically you will publish the site to Github Pages, so this should be the base URL for your Github Pages site.</li>
<li><strong>theme</strong> — This is the theme the library is using. Don&rsquo;t change this from &ldquo;infusion&rdquo;.</li>
<li><strong>description</strong> — This is a short description of the library and comes under the logo. You can include HTML like <code>&lt;em&gt;</code> and <code>&lt;strong&gt;</code>.</li>
<li><strong>description</strong> — This is a short description of the library and comes under the logo. You can include markdown syntax here, like <em>&#x002a;&#x002a;Infusion&#x002a;&#x002a;</em> in the above example for making the name of the library bold.</li>
<li><strong>codePenUser</strong> — If you want to embed codePens in your pattern files, you need to supply a codePen username here.</li>
</ul>

View File

@ -42,7 +42,7 @@
<a class="logo" href="/" aria-label="{{ .Site.Title }} pattern library home page">
<img src="{{ .Site.BaseURL }}images/logo.png" alt="">
</a>
<p class="library-desc">{{ .Site.Params.Description | safeHTML }}</p>
<p class="library-desc">{{ .Site.Params.Description | markdownify }}</p>
</div>
<nav id="patterns-nav" class="patterns" role="navigation">
<button id="menu-button" aria-expanded="false">Menu</button>

View File

@ -5,7 +5,7 @@
{{ end }}
<div class="demo" id="demo-{{ $uniq }}"></div>
{{ if .Get "caption" }}
<figcaption id="caption-{{ $uniq }}">{{ .Get "caption" }}</figcaption>
<figcaption id="caption-{{ $uniq }}">{{ .Get "caption" | markdownify }}</figcaption>
{{ end }}
{{ if .Get "caption" }}
</figure>

View File

@ -2,6 +2,6 @@
<figure role="group" aria-describedby="caption-{{ $caption | base64Encode | truncate 20 "" }}">
{{ .Inner }}
<figcaption id="caption-{{ $caption | base64Encode | truncate 20 "" }}">
{{ .Get "caption" | safeHTML }}
{{ .Get "caption" | markdownify }}
</figcaption>
</figure>