AsciiDoctor.jsを使った。
参照
https://catwalkagogo.blogspot.jp/2015/12/bloggerasciidoc.html
bloggerではできるらしい。はてなでもできないかと思い。
ソースコード
はてなブログの記事に以下を埋め込んだがダメだった。
<script src="https://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.5-5/asciidoctor.min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.5-5/css/asciidoctor.min.css"> <script> data = %(= asciidoctor.js - Render AsciiDoc in your browser! Dan Allen 2013-05-21 We've combined http://asciidoctor.org[Asciidoctor] and http://opalrb.org[Opal] to bring AsciiDoc rendering to the browser!) $window.addEventListener 'DOMContentLoaded', proc { html_doc = Asciidoctor.render(data, :safe => :safe, :attributes => %w(notitle! anchors imagesdir=./images)) $document.getElementById('content').innerHTML = html_doc }, false </script> == 見出し1 * リスト ** リスト
デザイン設定でヘッダに以下を埋め込んだ。
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id' itemprop='articleBody' expr:data-content="data:post.body"> </div>
これが何なのか理解していない。
調査
- asciidoctor.js
- asciidoctor.js - cdnjs.com - The best FOSS CDN for web related libraries to speed up your websites!
所感
とりあえず試してみたメモ。ちゃんと調査すればできるようになるのかもしれないが。