Skip to content

Commit

Permalink
feat: add edit with pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosirera committed Oct 2, 2020
1 parent 85b7ac4 commit b429351
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pages/blog/_slug.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
</aside>
<article class="mb-20">
<h1 class="text-4xl">{{ doc.title }}</h1>
<p>
<p class="opacity-50">
<span>🗓 {{ $d(new Date(doc.date), 'short') }}</span>
-
<span>⏱ {{ doc.timeToRead }} {{ $tc('posts.minute', 2) }}</span>
</p>
<p class="mt-1">
¿Un error 😱 ? Edita con una
<TheLink :url="urlPullRequest">Pull Request</TheLink>
</p>
<div class="mt-4 flex">
<Tag
v-for="(tag, index) in doc.tags"
Expand All @@ -31,6 +35,11 @@ export default {
const doc = await $content(`blog/${params.slug}`).fetch()
return { doc }
},
computed: {
urlPullRequest() {
return `https://github.com/pablosirera/pablosirera.com/tree/master/content/blog/${this.doc.slug}.md`
},
},
head() {
return {
title: `${this.doc.title} | Pablo Sirera 👨🏼‍💻`,
Expand Down

0 comments on commit b429351

Please sign in to comment.