Comments (4)
Thant worked.
Thanks!
from vue-head.
You did it?
Can you show me a part of your code?
from vue-head.
I too am having this problem. [email protected]
head: {
meta: [
function () {
return [
{ p: 'og:title', content: ' Contest Entry: <title> by <entrient> - ' + this.contest.name },
{ p: 'og:image', content: this.entry.full},
{ p: 'og:type', content: 'article'},
{ p: 'og:description', content: 'Do you think this entry should win? Visit now and vote for your choice.'},
{ p: 'og:site_name', content: this.contest.name + ' Washingtonian'},
{ n: 'twitter:card"', content:'summary_large_image'},
{ n: 'twitter:url', content:this.entry.url},
{ n: 'twitter:title', content:' Contest Entry: <title> by <entrient> - ' + this.contest.name },
{ n: 'twitter:description', content:'Do you think this entry should win? Visit now and vote for your choice.'},
{ n: 'twitter:image', content: this.entry.full},
{ n: 'twitter:site', content:this.contest.name + ' - Washingtonian'},
{ n: 'twitter:creator', content: '@washingtonian'},
}
]
},
In a ajax call
self.$emit('updateHead');
from vue-head.
Hi @tshafer
You are using the function inside an array, try that way:
head: {
meta: function () {
return [
{ p: 'og:title', content: ' Contest Entry: <title> by <entrient> - ' + this.contest.name },
{ p: 'og:image', content: this.entry.full},
{ p: 'og:type', content: 'article'},
{ p: 'og:description', content: 'Do you think this entry should win? Visit now and vote for your choice.'},
{ p: 'og:site_name', content: this.contest.name + ' Washingtonian'},
{ n: 'twitter:card"', content:'summary_large_image'},
{ n: 'twitter:url', content:this.entry.url},
{ n: 'twitter:title', content:' Contest Entry: <title> by <entrient> - ' + this.contest.name },
{ n: 'twitter:description', content:'Do you think this entry should win? Visit now and vote for your choice.'},
{ n: 'twitter:image', content: this.entry.full},
{ n: 'twitter:site', content:this.contest.name + ' - Washingtonian'},
{ n: 'twitter:creator', content: '@washingtonian'}
]
}
},
And take a look here about updateHead
from vue-head.
Related Issues (20)
- Problem with ssr (Nuxt.js)
- Vue Head Is not reactive HOT 2
- TypeError: self.$on is not a function HOT 1
- No Typescript support HOT 2
- updateHead add's the changed meta instead of updating HOT 4
- Read globally? HOT 4
- Option to remove links with duplicated hreflangs HOT 2
- Script Editing the DOM HOT 3
- keep-alive HOT 2
- vue-head on Vue SPA? HOT 3
- How to add raw script HOT 4
- Why not submit to CDNJS? HOT 1
- How about Vue 3? HOT 4
- I want to remove separating spaces from title tag. HOT 1
- With vue-head head title is added on events page HOT 2
- Loaded scripts are available only with delay HOT 3
- Meta tags not reset on navigate HOT 10
- Title tag concatenation error HOT 2
- REMOVAL OF DEFAULT HEAD COMPLEMENT HOT 3
- Vue 3 support HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-head.