Commit Graph

1355 Commits

Author SHA1 Message Date
Joe Wegner
f26179ae6a replace colors with chalk everywhere
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
2015-05-19 11:07:40 -05:00
John O'Nolan
443eafeeca First styles for private blog login 2015-05-11 13:11:59 +01:00
Hannah Wolfe
37f92674b8 Merge pull request #5253 from jaswilli/roles-browse-filter
Fix up filtering implementation
2015-05-11 09:55:33 +01:00
Jason Williams
263bbd5092 Fix up filtering implementation 2015-05-10 20:48:32 -05:00
Jason Williams
251218de1d Check error object before dereference
Refs #5095
2015-05-10 15:02:09 +00:00
Jason Williams
1e5440664e Change payload storage in session cookie 2015-05-07 13:58:09 +00:00
Jason Williams
cc7c5be75b Merge pull request #5220 from ErisDS/api-route-tweak
Remove unneeded code from API route
2015-05-05 15:07:21 -05:00
Austin Burdine
8ac168794e refactors the frontend controller
closes #5192
- combines homepage, author, tag routes into one function (with different hash params)
- provides some abstraction for channels
2015-05-05 07:35:08 -05:00
Hannah Wolfe
95a546171a Remove unneeded code from API route 2015-05-05 12:50:23 +01:00
Austin Burdine
2865662ee5 added password protection
closes #4993
- brings password protection to the frontend of blogs
- adds testing for password protection
- upgrades bcrypt-js to 2.1.0
2015-04-30 23:44:43 -05:00
Jason Williams
dae66d00be Upgrade grunt-jscs to fix whitespace linting.
No issue.
- grunt-jscs@1.8.0
- Fix formatting
2015-04-30 16:14:19 -05:00
Matt Enlow
433956c102 Add post preview via uuid (/p/:uuid)
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)
2015-04-30 11:57:37 +01:00
Jason Williams
5cfb2e701e Allow admin app to run when active theme missing
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.
2015-04-25 20:00:04 +00:00
Hannah Wolfe
1e6f6237e1 Merge pull request #5184 from lmoe/master
Added res.locals into the prePostsRender filter call
2015-04-24 17:05:40 +01:00
Wilhansen Li
d02bcbacc2 Provide secure post links if RSS accessed over SSL 2015-04-24 18:20:38 +08:00
lmoe
03dcb71b08 Added res.locals into the prePostsRender filter call
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.
2015-04-22 23:22:31 +02:00
Hannah Wolfe
3d5fe130c2 Merge pull request #5181 from sebgie/issue#5178
Rename error.type to error.errorType
2015-04-22 22:00:08 +01:00
Sebastian Gierlinger
fdcb67d3cc Rename error.type to error.errorType
closes #5178
- renamed error.type to error.errorType
2015-04-22 22:29:45 +02:00
Hannah Wolfe
eb5eca6eda Don't pass helper options to API for next/prev
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
2015-04-22 20:24:22 +01:00
Hannah Wolfe
32125c2f46 Filter options passed to 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
2015-04-22 20:20:27 +01:00
Hannah Wolfe
e26e83d40a Refactor to remove author.email from API
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
2015-04-17 22:27:04 +01:00
Hannah Wolfe
ede50f38a3 Merge pull request #5149 from cobbspur/headfix
Fix ghost_head helper on error pages
2015-04-16 20:22:50 +01:00
cobbspur
a48458b73d Fix ghost_head helper on error pages
closes #5146

 - Checks for context key before assigning it to variable
2015-04-16 18:40:17 +01:00
Hannah Wolfe
1b585f213c Cache invalidation can no longer be so clever
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.
2015-04-14 16:34:34 +01:00
Hannah Wolfe
8d1e729f30 RSS Refactor with cache
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
2015-04-10 21:32:14 +01:00
Sebastian Gierlinger
8f5960e1c5 Merge pull request #5108 from ErisDS/rss-2
Add media:content support to RSS
2015-04-10 12:49:51 -05:00
Hannah Wolfe
0b1497a75b No more feature flag for Code Injection
closes #1993

- remove the feature/config flag that means code injection has to be enabled
2015-04-09 17:52:41 +01:00
Matt Enlow
920856c479 Merge pull request #5109 from ErisDS/issue-5064
Remove duplicate subdirectory in RSS urls
2015-04-09 08:35:25 -06:00
Hannah Wolfe
4839b58ff0 Merge pull request #4891 from cobbspur/structured2
Adds structured data to first index/tag/author page
2015-04-07 21:24:19 +01:00
cobbspur
3229508c54 Adds structured data to first index/tag/author page
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
2015-04-07 20:36:53 +01:00
Hannah Wolfe
14134fb4b0 Add media:content support to RSS
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>`
2015-04-06 18:47:10 +01:00
Hannah Wolfe
527e4eed06 Remove duplicate subdirectory in RSS urls
fixes #5064

- this is a quick and dirty fix for now
2015-04-05 23:30:22 +01:00
Hannah Wolfe
196bbfce18 Refactor sitemaps to use centralised events
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
2015-04-05 19:32:18 +01:00
Matt Enlow
242388f743 Merge pull request #5065 from ErisDS/rss-2263
Improve RSS feed
2015-04-04 07:55:33 -06:00
Hannah Wolfe
0a780de2bb Merge pull request #5070 from baogechen/master 2015-04-03 20:25:45 +01:00
baogechen
351298b83b Add parent call in user.format to fix dateTime
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.
2015-04-03 20:04:19 +01:00
Hannah Wolfe
79d213436e Improve RSS feed
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
2015-04-03 19:00:00 +01:00
Hannah Wolfe
cb2f0c5dee Merge pull request #5056 from ianlopshire/master
url helper breaks subdomains
2015-04-02 22:08:23 +01:00
Hannah Wolfe
6163862b18 Merge pull request #5068 from msiemens/meta_description_v2
Rewrite meta_description and meta_title to depend upon the current context
2015-03-29 20:28:13 +03:00
Hannah Wolfe
501595127f Fix @blog globals in special templates
fixes #5024

- pass options through to the template for both navigation and pagination
- add a test for each
2015-03-28 23:21:10 +02:00
cobbspur
4044dedeb2 Adds {{prev_post}} and {{next_post}} block helpers
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
2015-03-25 17:21:27 +00:00
Markus Siemens
c5fe9aa99f Rewrite meta_description and meta_title to depend upon the current context
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.
2015-03-24 22:42:45 +01:00
Matt Enlow
5015180474 Merge pull request #5054 from ErisDS/express-hbs-update
Update express-hbs & registerAsyncHelper function
2015-03-24 11:33:46 -06:00
Katie Fenn
980b0a8610 Refactoring hard-coded frontend route keywords
closes #4519

- Added configurable route keywords
- Replaced instances of hard-coded keywords with config
- Added keywords to frontend tests stub config
2015-03-23 15:00:02 +00:00
Ian Lopshire
e74a329b8a Navigation menu support for subdomains of blog url
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 /
2015-03-22 00:40:55 -05:00
Hannah Wolfe
6cd696b332 Merge pull request #4820 from phated/file-storage
File storage
2015-03-20 08:55:19 +00:00
Blaine Bublitz
5c640e95f5 Initial implementation for custom storage engines
closes #4600
- implemented as suggested in #4600
- loads a custom storage defined in config from the /content/storage directory
2015-03-19 22:34:01 -07:00
Matt Enlow
61b86bf821 Merge pull request #5027 from felixrieseberg/iss4847
Replace fs.exists (deprecated) with fs.stat
2015-03-19 10:47:01 -06:00
Hannah Wolfe
1db59e12ee Move showdown extensions to ghost-showdown
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
2015-03-17 20:18:08 +00:00
Felix Rieseberg
0484eee6a5 Replace fs.exists (deprecated) with fs.stat
Closes #4847

- Replaces the deprecated fs.exists() with fs.stat(), in accordance with iojs & node.
2015-03-17 11:49:43 -07:00