From 543b9102ad6b70a88f71019f120d475d82858660 Mon Sep 17 00:00:00 2001 From: Kristian Polso Date: Mon, 25 Jun 2018 09:10:15 +0300 Subject: [PATCH] Make Slate client-side only --- content/.vuepress/components/Slate.vue | 7 ++++--- content/slate-test.md | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/content/.vuepress/components/Slate.vue b/content/.vuepress/components/Slate.vue index 4e767fb..7d6da1b 100644 --- a/content/.vuepress/components/Slate.vue +++ b/content/.vuepress/components/Slate.vue @@ -53,7 +53,8 @@ htmlContent: "", searchIndex: {}, searchResults: {}, - toc: {} + toc: {}, + markdownFile: "" } }, @@ -154,8 +155,8 @@ } }, - mounted: function () { - this.$http.get("/api.md").then(function (response) { + created: function () { + this.$http.get(this.markdownFile).then(function (response) { this.htmlContent = md.render(response.body); this.$nextTick(function () { diff --git a/content/slate-test.md b/content/slate-test.md index f9737ef..995ac2e 100644 --- a/content/slate-test.md +++ b/content/slate-test.md @@ -1 +1,3 @@ - + + + \ No newline at end of file