Skip to content
Permalink
Browse files

Refactored ghost head helper

closes #6186
- Refactored ghost head helper to use the new metadata functions.
- Fix issue where tag should output description if missing meta description.
- Add test for tag description.
- Updated tests to look for author urls with a tailing backslash
- Fix author to output meta description first and then bio if missing.
  • Loading branch information...
jtwebman committed Jan 27, 2016
1 parent 6095300 commit 06d91ce0464a579ffabe1132d00f975d8358c51e
@@ -12,9 +12,9 @@ function getDescription(data, root) {
} else if (_.contains(context, 'home')) {
description = config.theme.description;
} else if (_.contains(context, 'author') && data.author) {
description = data.author.bio;
description = data.author.meta_description || data.author.bio;
} else if (_.contains(context, 'tag') && data.tag) {
description = data.tag.meta_description;
description = data.tag.meta_description || data.tag.description;
} else if ((_.contains(context, 'post') || _.contains(context, 'page')) && data.post) {
description = data.post.meta_description;
}

0 comments on commit 06d91ce

Please sign in to comment.
You can’t perform that action at this time.