aboutsummaryrefslogtreecommitdiff
path: root/src/html/blog.html
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2019-03-19 21:21:35 -0400
committerMark Powers <markppowers0@gmail.com>2019-03-19 21:21:35 -0400
commit334ab41cc872d35ecad4f1758458210ab4649701 (patch)
tree567ec589a5c08a5fe9c3837bfbfc179c09626ec6 /src/html/blog.html
parent3d682ea13ab9d83f453fa85ea88fc28163c6b259 (diff)
Add markdown support for blog
Diffstat (limited to 'src/html/blog.html')
-rw-r--r--src/html/blog.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/html/blog.html b/src/html/blog.html
index a0a9361..4a35319 100644
--- a/src/html/blog.html
+++ b/src/html/blog.html
@@ -9,6 +9,7 @@
<script src="/js/feed.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
+ <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
window.onload = loadFeed(function () {
var feed = new Vue({
@@ -18,7 +19,11 @@
},
created() {
fetch(new Request('/posts/blog')).then(response => response.json())
- .then(response => this.posts = response);
+ .then(response => { response.forEach(post => {
+ post.description = marked(post.description)
+ this.posts.push(post);
+ });
+ });
}
});
})