From ac03309095648a4ced4d3cfc4b2399053fe7dce4 Mon Sep 17 00:00:00 2001 From: Tommy Vedvik Date: Thu, 28 Feb 2019 21:14:00 +0100 Subject: [PATCH] Add tags links --- content/posts/a-post-with-a-cover.md | 2 +- content/posts/markdown-test-file.md | 2 +- src/components/PostCard.vue | 13 ++++++++++++- src/components/PostTags.vue | 29 ++++++++++++++++++++++++++++ src/pages/Index.vue | 10 ++++++++++ src/templates/Post.vue | 14 ++++++++++++-- 6 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 src/components/PostTags.vue diff --git a/content/posts/a-post-with-a-cover.md b/content/posts/a-post-with-a-cover.md index 2db87ac..63fde9f 100644 --- a/content/posts/a-post-with-a-cover.md +++ b/content/posts/a-post-with-a-cover.md @@ -2,7 +2,7 @@ title: A post with a cover image date: 2019-01-07 published: true -tags: ['Markdown'] +tags: ['Markdown', 'Cover Image'] series: false cover_image: ./images/alexandr-podvalny-220262-unsplash.jpg canonical_url: false diff --git a/content/posts/markdown-test-file.md b/content/posts/markdown-test-file.md index a9f3070..535a199 100644 --- a/content/posts/markdown-test-file.md +++ b/content/posts/markdown-test-file.md @@ -2,7 +2,7 @@ title: Markdown test files date: 2019-02-06 published: true -tags: ['Markdown'] +tags: ['Markdown','Test files'] canonical_url: false description: "Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions." --- diff --git a/src/components/PostCard.vue b/src/components/PostCard.vue index e37472c..982f836 100644 --- a/src/components/PostCard.vue +++ b/src/components/PostCard.vue @@ -6,7 +6,10 @@

+ + + Link

@@ -14,9 +17,12 @@ + + \ No newline at end of file diff --git a/src/pages/Index.vue b/src/pages/Index.vue index d789d3c..35d7dea 100644 --- a/src/pages/Index.vue +++ b/src/pages/Index.vue @@ -27,10 +27,20 @@ query { id title path + tags { + id + title + path + } date (format: "D. MMMM YYYY") timeToRead description coverImage (width: 770, height: 380, blur: 10) + ...on Post { + id + title + path + } } } } diff --git a/src/templates/Post.vue b/src/templates/Post.vue index f07093d..5c81fb5 100644 --- a/src/templates/Post.vue +++ b/src/templates/Post.vue @@ -6,15 +6,18 @@ +
+
+
@@ -28,12 +31,14 @@ @@ -45,6 +50,11 @@ query Post ($path: String!) { path date (format: "D. MMMM YYYY") timeToRead + tags { + id + title + path + } description content coverImage (width: 860, blur: 10)