diff options
Diffstat (limited to 'src/html/blog.html')
-rw-r--r-- | src/html/blog.html | 7 |
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); + }); + }); } }); }) |