Skip to content

Commit

Permalink
add metadata to all other pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan James committed May 18, 2023
1 parent dd47486 commit 613bd38
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/pages/course/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default {
},
head() {
return {
title: this.selectedCourse.title,
title: `EOS Learn - ${this.selectedCourse.title}`,
meta: [
{ hid: 'description', name: 'description', content: this.selectedCourse.description },
{ hid: 'og:title', property: 'og:title', content: this.selectedCourse.title },
Expand Down
2 changes: 1 addition & 1 deletion frontend/pages/course/_id/episode/_episode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
},
head() {
return {
title: this.selectedCourse.title,
title: `EOS Learn - ${this.episode.title}`,
meta: [
{ hid: 'description', name: 'description', content: this.episode.description },
{ hid: 'og:title', property: 'og:title', content: this.episode.title },
Expand Down
3 changes: 3 additions & 0 deletions frontend/pages/earn/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<script>
export default {
name: 'Earn',
head() {
return this.$common.head;
},
data(){return {
panels:[
// {
Expand Down
3 changes: 3 additions & 0 deletions frontend/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default {
courses: {},
continueWatching:[],
}},
head() {
return this.$common.head;
},
computed:{
leftOverCourses(){
if(!this.courses || !this.courses.courses || !this.courses.courses.length){
Expand Down
3 changes: 3 additions & 0 deletions frontend/pages/profile/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ export default {
profile: null,
progresses:[]
}},
head() {
return this.$common.head;
},
methods:{
goToCourse(course){
this.$router.push(`/course/${course.slug}`)
Expand Down
15 changes: 15 additions & 0 deletions frontend/plugins/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ export default (context, inject) => {
location.href = redirectUrl;
}
}
},
head(){
const description = `Watch video courses on blockchain development for the EOS Network`;
const title = `Learn EOS Blockchain Development`;
return {
title: `EOS Learn`,
meta: [
{ hid: 'description', name: 'description', content: description },
{ hid: 'og:title', property: 'og:title', content: title },
{ hid: 'og:description', property: 'og:description', content: description },
{ hid: 'twitter:title', name: 'twitter:title', content: title },
{ hid: 'twitter:description', name: 'twitter:description', content: description },
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' }
],
};
}
});
}

0 comments on commit 613bd38

Please sign in to comment.