issue #5259
- removes the colors dependency
- adds in chalk dependency, and migrates everything to use that
- reduces some specs now that the log calls are cleaner
Refs #5097
- All drafts will show a preview link (this needs real css)
- Published posts will redirect
- prev/next post helpers only activate on published posts
- Powered by ~10 pints between the two of us (@ErisDS, @novaugust)
Closes#5155
- If the theme that has been set to active is missing, set
a default express-hbs instance on the express app and allow
middleware processing to continue so that the admin client can
be accessed.
- Log a warning when this happens.
- Fix issue where frontend error page was not being rendered
correctly.
closes#2559
- Added res.locals as a second parameter to the prePostsRender filter
call.
- This allows accessing the relative url and makes it possible to
react to certain urls.
fixes#5177
- this combined with a change passing options through to toJSON results in a really flukey bug with next/prev
where the name option from the helper clashes with a name option inside of toJSON
fixes#5177
- we now pass API/model options directly to toJSON, which is unsafe as these options haven't always been filtered before they are passed.
- this fix adds a filter so that toJSON only uses the options it needs
- additionally, rename the 'name' option to something more specific to prevent clashes
refs #2330
- Pass through `options` to all toJSON calls on posts, tags, and users
- Use options.context.user to determine whether it's OK to return user.email
- Remove author.email handling code from frontend.js
no issue
With the introduction of the prev/next helpers (and soon, get helper) we can no longer make any assumptions
about exactly which pages need to be cleared from the cache when a post is published/unpublished.
refs #5091, refs #2263
- Move rss handling out of the frontend controller and into its own module
- Separate the code into logical blocks
- Wrap the generation code in a in-memory cache to prevent it being regenerated on every request
Closes#4677
- Tests if page is first page or paginated
- Adds relevant structured data to index/tag/author page
- Does not add structured data on paginated pages
- For author structured data, cover image overrides image
- blog cover image is made absolute by image helper
- Tests updated to use regular expressions and new tests
refs #2263, #4888
- Adds media:content element to Ghost Rt pSS feeds containing the post cover image if one is available
- Removes the prepending of the image to the `<description>` field
- Keeps the prepending of the image in `<content:encoded>`
fixes#5104, refs #4348, #2263
- Create a centralised event module
- Hook it up for posts, pages, tags and users
- Use it in sitemaps instead of direct method calls
- Use it for xmlrpc calls
- Check events are fired in model tests
- Update sitemap tests to work with new code
- Fix a bug where invited users were appearing in sitemaps
- Move sitemaps and xmlrpc into a directory together
closes#5066
- fix a problem that user model will fail to save if mysql has option of
STRICT_TRANS_TABLES
- add a parent call in user.format override function, which should fix
dateTime format before user saved.
refs #2263
- Switch content type back to text/xml
- Use content:encode for full content
- Use meta description or first 50 words of content for description
closes#4799
- Adds a prev_next helper method called by {{prev_post}} and {{next_post}}
- Shows correct template for if and else blocks
- Adds unit tests
closes#4850
- fixed `meta_description` and `meta_title` when used within a `{{#foreach}}`
- `meta_description` and `meta_title` now depend upon the current context
to get the right string (author bio, tag description, ...).
Note: `ghost_head.js` and `ghost_head_spec.js` have been touched to add
the required context information when calling the helpers.
Closes#5033
- Added unit tests for the nav context of urlFor
- Fixed issue in the nav context of urlFor where subdomains of blog url were truncated
- Fixed issue in the nav context of urlFor where there was sometimes an extra preceding /
no issue
- We already maintain our own fork of showdown, this moves our custom extensions to our fork
- Code duplication is removed
- Tests are also moved to the other repo