mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Updated post list preview to use excerpt
instead of plaintext
This commit is contained in:
parent
fb7db69ffe
commit
81eddbbf72
@ -31,8 +31,8 @@ export default Component.extend({
|
||||
return authors.map(author => author.get('name') || author.get('email')).join(', ');
|
||||
}),
|
||||
|
||||
subText: computed('post.{plaintext,customExcerpt,metaDescription}', function () {
|
||||
let text = this.get('post.plaintext') || '';
|
||||
subText: computed('post.{excerpt,customExcerpt,metaDescription}', function () {
|
||||
let text = this.get('post.excerpt') || '';
|
||||
let customExcerpt = this.get('post.customExcerpt');
|
||||
let metaDescription = this.get('post.metaDescription');
|
||||
|
||||
|
@ -76,6 +76,7 @@ export default Model.extend(Comparable, ValidationEngine, {
|
||||
validationType: 'post',
|
||||
|
||||
createdAtUTC: attr('moment-utc'),
|
||||
excerpt: attr('string'),
|
||||
customExcerpt: attr('string'),
|
||||
featured: attr('boolean', {defaultValue: false}),
|
||||
featureImage: attr('string'),
|
||||
|
@ -34,10 +34,6 @@ export default ApplicationSerializer.extend(EmbeddedRecordsMixin, {
|
||||
|
||||
// Properties that exist on the model but we don't want sent in the payload
|
||||
delete json.uuid;
|
||||
// Server-side-generated fields
|
||||
// TODO: remove once the API has protection against overriding auto generation
|
||||
delete json.html;
|
||||
delete json.plaintext;
|
||||
// Inserted locally as a convenience.
|
||||
delete json.author_id;
|
||||
// Read-only virtual property.
|
||||
|
@ -18,6 +18,7 @@ export default Factory.extend({
|
||||
ogDescription: null,
|
||||
ogImage: null,
|
||||
ogTitle: null,
|
||||
excerpt(i) { return `Excerpt for post ${i}.`; },
|
||||
plaintext(i) { return `Plaintext for post ${i}.`; },
|
||||
publishedAt: '2015-12-19T16:25:07.000Z',
|
||||
publishedBy: 1,
|
||||
|
Loading…
Reference in New Issue
Block a user