zk_html/tech/md-ext/verse.html

52 lines
2.6 KiB
HTML
Raw Normal View History

2020-04-22 06:40:11 +00:00
<!doctype html>
<html>
<head>
<title>Zk | Verse Markdown Extension</title>
<link rel="stylesheet" type="text/css" href="/style.css" />
<meta name="viewport" content="width=device-width" />
<meta charset="utf-8" />
</head>
<body>
<main>
<header>
<h1>Zk | Verse Markdown Extension</h1>
</header>
<article class="content">
<p><span class="tag">tech</span> <span class="tag">markdown</span> <span class="tag">vimwiki</span> <span class="tag">python</span> <span class="tag">package</span></p>
<h2 id="what-it-does">What it does</h2>
2020-06-24 07:10:07 +00:00
<p>I write a lot of poetry, but don&rsquo;t want to use code blocks for it, preferring instead to use a <code>div</code> with <code>white-space: pre-wrap</code> style. I use a triple single-quote fence.</p>
2020-04-24 08:40:06 +00:00
<div class="verse">This
2020-04-22 06:40:11 +00:00
is
a
2020-04-24 08:40:06 +00:00
poem</div>
2020-04-22 06:40:11 +00:00
<h2 id="how-to-use-it">How to use it</h2>
<div class="codehilite"><pre><span></span><code><span class="n">default_config</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;tag_tuple&#39;</span><span class="p">:</span> <span class="p">(</span><span class="s1">&#39;&lt;div class=&quot;verse&quot;&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;/div&gt;&#39;</span><span class="p">),</span>
<span class="p">}</span>
<span class="n">my_config</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;tag_tuple&#39;</span><span class="p">:</span> <span class="p">(</span><span class="s1">&#39;&lt;verse&gt;&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;/verse&gt;&#39;</span><span class="p">),</span>
<span class="p">}</span>
<span class="n">markdown</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">extensions</span><span class="o">=</span><span class="p">[</span><span class="n">VerseExtension</span><span class="p">(</span><span class="o">**</span><span class="n">my_config</span><span class="p">)])</span>
</code></pre></div>
<h2 id="where-to-get-it">Where to get it</h2>
<ul>
<li><a href="https://pypi.com/project/markdown-verse">PyPI</a></li>
<li><a href="https://github.com/makyo/markdown-verse">Github</a></li>
</ul>
</article>
<footer>
2020-06-24 07:10:07 +00:00
<p>Page generated on 2020-06-24</p>
2020-04-22 06:40:11 +00:00
</footer>
</main>
2020-06-24 07:10:07 +00:00
<script type="text/javascript">
document.querySelectorAll('.tag').forEach(tag => {
let text = tag.innerText;
tag.innerText = '';
tag.innerHTML = `<a href="/tags.html#${text}">${text}</a>`;
});
</script>
2020-04-22 06:40:11 +00:00
</body>
</html>