Skip to content

Commit

Permalink
debug: ogp meta override
Browse files Browse the repository at this point in the history
  • Loading branch information
yasu committed Mar 9, 2020
1 parent 95fb751 commit 6ce5490
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ jobs:
with:
name: ogps
path: ogps
- run: for (i in $(ls -d ogps/*)) { cp $i static/${i#*/} }
20 changes: 10 additions & 10 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ const config: Configuration = {
content: '東京都 新型コロナウイルス感染症対策サイト'
},
{ hid: 'og:type', property: 'og:type', content: 'website' },
{
hid: 'og:url',
property: 'og:url',
content: 'https://stopcovid19.metro.tokyo.lg.jp'
},
// {
// hid: 'og:url',
// property: 'og:url',
// content: 'https://stopcovid19.metro.tokyo.lg.jp'
// },
{
hid: 'og:title',
property: 'og:title',
Expand All @@ -42,11 +42,11 @@ const config: Configuration = {
content:
'当サイトは新型コロナウイルス感染症(COVID-19)に関する最新情報を提供するために、東京都が開設したものです。'
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://stopcovid19.metro.tokyo.lg.jp/ogp.png'
},
// {
// hid: 'og:image',
// property: 'og:image',
// content: 'https://stopcovid19.metro.tokyo.lg.jp/ogp.png'
// },
{
hid: 'twitter:card',
name: 'twitter:card',
Expand Down
9 changes: 8 additions & 1 deletion pages/cards/_card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@ export default {
},
head() {
const url = location.protocol + '//' + location.host
const ogpImage = url + '/ogp-' + this.$route.params.card + '.png'
const description =
this.updatedAt +
' 更新 | ' +
'当サイトは新型コロナウイルス感染症(COVID-19)に関する最新情報を提供するために、東京都が開設したものです。'
return {
title: this.title,
meta: [
Expand All @@ -124,7 +126,12 @@ export default {
{
hid: 'og:image',
property: 'og:image',
content: url + '/ogp-' + this.$route.params.card + '.png'
content: ogpImage
},
{
hid: 'twitter:image',
property: 'twitter:image',
content: ogpImage
}
]
}
Expand Down
14 changes: 13 additions & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,19 @@ export default {
},
head() {
return {
title: this.headerItem.title
title: this.headerItem.title,
meta: [
{
hid: 'og:url',
property: 'og:url',
content: 'https://stopcovid19.metro.tokyo.lg.jp'
},
{
hid: 'og:image',
property: 'og:image',
content: 'https://stopcovid19.metro.tokyo.lg.jp/ogp.png'
}
]
}
}
}
Expand Down
Binary file modified static/ogp-attributes-of-confirmed-cases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/ogp-details-of-confirmed-cases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/ogp-number-of-confirmed-cases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/ogp-number-of-reports-to-covid19-consultation-desk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/ogp-number-of-tested.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/ogp-predicted-number-of-toei-subway-passengers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6ce5490

Please sign in to comment.