better SEO

This commit is contained in:
les
2019-09-18 12:55:33 +02:00
parent bb968ffe90
commit d264ca4973
6 changed files with 45 additions and 31 deletions

View File

@@ -39,11 +39,11 @@ module.exports = (sequelize, DataTypes) => {
//
event.prototype.toAP = function (username, follower = []) {
const tags = this.tags && this.tags.map(t => '#' + t.tag).join(' ')
const content = `<a href='${config.baseurl}/event/${this.id}'>${this.title}<br/>
const content = `<a href='${config.baseurl}/event/${this.id}'>${this.title}</a><br/>
📍${this.place.name}<br/>
${moment.unix(this.start_datetime).format('dddd, D MMMM (HH:mm)')}<br/><br/>
${this.description.length > 200 ? this.description.substr(0, 200) + '...' : this.description}<br/>
${tags} <br/></a>`
${tags} <br/>`
const attachment = []
if (this.image_path) {