Skip to content

Commit

Permalink
Add RSS button and discovery tag in head
Browse files Browse the repository at this point in the history
  • Loading branch information
Soleone committed Apr 6, 2021
1 parent fce77fe commit 6d12384
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"firebaseui": "^4.6.1",
"vue": "^2.6.11",
"vue-gtag": "^1.9.1",
"vue-head": "^2.2.0",
"vue-router": "^3.2.0",
"vuefire": "^2.2.2",
"vuetify": "^2.2.11",
Expand Down
18 changes: 18 additions & 0 deletions public/rss.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import store from './store'
import { firestorePlugin } from 'vuefire'
import vuetify from './plugins/vuetify'
import VueGtag from 'vue-gtag'
import VueHead from 'vue-head'
import { config } from '@/../firebase.config.js'

Vue.use(
Expand All @@ -15,6 +16,7 @@ Vue.use(
router
)
Vue.use(firestorePlugin)
Vue.use(VueHead)

Vue.config.productionTip = false

Expand Down
23 changes: 22 additions & 1 deletion src/views/Videos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</v-col>
</v-row>
<v-row>
<v-col>
<v-col cols="12" lg="10">
<GATrack event-name="clickCategoryFromList" event-label="All">
<v-chip class="mr-1 mb-2" to="/videos" :label="!videoCategory">
All
Expand All @@ -29,6 +29,14 @@
</v-chip>
</GATrack>
</v-col>
<v-col class="text-lg-right">
<v-chip label outlined @click="visitRSS()">
<v-avatar left tile>
<v-img src="/rss.svg"></v-img>
</v-avatar>
Subscribe via RSS
</v-chip>
</v-col>
</v-row>

<v-row>
Expand Down Expand Up @@ -94,7 +102,20 @@ export default {
methods: {
categoryObject(category) {
return new Category(category)
},
visitRSS() {
window.location.href = 'http://localhost:8080/feed.xml'
}
},
head: {
link: [
{
rel: 'alternate',
type: 'application/rss+xml',
title: 'Gunchained videos feed',
href: '/feed.xml'
}
]
}
}
</script>
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9833,6 +9833,11 @@ vue-gtag@^1.9.1:
resolved "https://registry.yarnpkg.com/vue-gtag/-/vue-gtag-1.9.1.tgz#d5b20774b298e3aa330580d66783715fd3eded16"
integrity sha512-pVQyBaczTR7ZYxuxu8JjbHP8p41o1G/5hBDykONpU6EyRsHHx/B7PO2ZtW38/QYn0msuSyGkWulS1tliLuOXLQ==

vue-head@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/vue-head/-/vue-head-2.2.0.tgz#9e3a141d5a011599a3f6d7adb42a65c428cf73e1"
integrity sha512-Oss1gakOSPQ4e/XZ0yM7yolnhSDvfDYZbM6CDD3xkCpAyPfTR+Bv3tabgtKE41gHr5GzC/NJh1EwQSu7o05XRw==

vue-hot-reload-api@^2.3.0:
version "2.3.4"
resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
Expand Down

0 comments on commit 6d12384

Please sign in to comment.