2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

1325 commits

Author SHA1 Message Date
Jason Williams
591fa349aa Finish up post count support in tags API
Refs #4521
- Handle 'include' query param in tags API.
- Add post_count support when fetching a tag with findOne.
- Remove post_count from options.include after processing.
- Extra database query no longer used to fetch post_count.
2014-12-19 21:46:34 +00:00
Hannah Wolfe
6af0b83b7c Merge pull request #4670 from jaswilli/model-opt
Optimize model class methods
2014-12-19 21:19:01 +00:00
Hannah Wolfe
e6227e7a24 Merge pull request #4674 from delgermurun/post-sort
Add 'id' to post sort fields. So there is no longer equally sorted posts.
2014-12-19 21:05:45 +00:00
Jason Williams
5c6d45f258 Optimize model class methods
No Issue
- Reorder promise chains to defer database queries until they
  are needed.
- Execute database queries that are not dependent on each other in
  parallel instead of sequentially.
- Reduce the number of variables used to hold state across multiple
  promise blocks.
- Do not go async unless necessary.
2014-12-19 00:54:22 +00:00
Hannah Wolfe
8ceb896e96 Merge pull request #4654 from ekulabuhov/4521_TagPostCount
[API] Return post count for each tag
2014-12-19 00:17:36 +00:00
Eugene Kulabuhov
539accf69f [API] Return post count for each tag
closes #4521
- if '?include=post_count' present, query db for tag/post_count information
  and append it to returned JSON
- fixed linter errors
- added integration test
- parsing to int as knex (or PostGres driver) is returning bigint as strings
- iterating through a smaller collection to avoid exception
2014-12-18 23:54:18 +00:00
Hannah Wolfe
3c9273ed37 Data importer improvements and fixes
refs #4605, #4479

- Removes versioning from the importer
- Fixes an issue with SQLITE errors not being thrown properly for posts
- Ensures that posts have a created_at date
- Makes sure that the API wrapper is properly handled
2014-12-18 19:50:53 +00:00
Jason Williams
68df133d65 Merge pull request #4646 from ErisDS/importer-refactor
Refactor importer with tests
2014-12-18 13:24:11 -06:00
Hannah Wolfe
1b37ba5753 Merge pull request #4676 from jaswilli/pg-update
Update pg package and convert data to correct type
2014-12-18 16:50:01 +00:00
Jason Williams
3ad68526cb Update pg package and convert data to correct type
No Issue
- Switch 'pg.js' package for 'pg' as the native bindings are
  now an optional add-on to pg and pg.js has been deprecated.
- pg@4.1.1
- Set the driver's parser to automatically convert integer data
  returned from postgres into a javascript integer.
2014-12-18 14:58:20 +00:00
Delgermurun
afdb3a948d Add 'id' to post sort fields. So there is no longer equally sorted posts.
closes #4648
- Add id to order by fields on posts API
- Order by id on posts controller
2014-12-18 11:34:26 +08:00
Hannah Wolfe
20710b9eba Refactor importer with tests
refs #4605

- Move as much code as possible out of the DB API
- Split the importer into 2 concepts, code which handles different
  filetypes and code which takes the content of files and imports it into
  Ghost in some way
- Split the import process into 4 steps, load the file into a useful
  format, preprocess the data, do the import, generate a report
- Reporting is currently a no-op
- Adds a basic level of testing
2014-12-17 18:22:39 +00:00
cobbspur
cbcda2faf8 Provide absolute blog url in sitemap
No issue

- Adds {{blog-url}} to sitemap.xsl
- Replaces all occurences of {{blog-url}} with absolute bkog url
2014-12-17 14:55:27 +00:00
cobbspur
7d79016af5 stop middleware converting favicon to string
closes #4658

- adds conditional to prevent favicon being processed as a string
2014-12-16 20:22:31 +00:00
Hannah Wolfe
a0db21d3ec Merge pull request #4629 from cobbspur/postpreview
Add view post link on published and updated posts
2014-12-15 13:28:47 +00:00
cobbspur
53d12a9659 Add view post link on published and updated posts
closes #1756

- adds a post url link to 'post updated' and 'post published' in editor
- adds join function in ghost paths
- adds a '/' detection to makeRoute method
- adds test for join function
2014-12-15 12:18:47 +00:00
Hannah Wolfe
9bb3be49d5 Merge pull request #4636 from cobbspur/sitemap
Fixes sitemap image errors
2014-12-14 23:27:04 +00:00
cobbspur
4ca87f6336 Fixes sitemap image errors
closes #4591

- switches to using author cover image
- adds a protocol of http if using a protocol relative url
2014-12-14 23:03:40 +00:00
cobbspur
9a0dc0be58 Adds complete url for Sitemap in robots.txt
closes #4589

- Adds {{blog-url}} to robots.txt
- Replaces {{blog-url}} with blog.url from config
2014-12-13 18:01:28 +00:00
Hannah Wolfe
35ee121761 Merge pull request #4628 from sebgie/issue#4624
Password change MU
2014-12-12 10:07:34 +00:00
Sebastian Gierlinger
40c78493a3 Password change MU
closes #4624
- added user_id to password reset request
- hide old password field
- updated changePassword method to check permissions
- updated changePassword method to work without oldPassword
- fixed bug for errors shown as [Object object]
2014-12-11 21:23:07 +01:00
Sebastian Gierlinger
f531ef19f8 Merge pull request #4626 from ErisDS/issue-4607
Add support for zip import
2014-12-11 20:52:04 +01:00
Sebastian Gierlinger
1626a8f292 Merge pull request #4529 from cobbspur/permalink
Return computed url with post object
2014-12-11 10:30:41 +01:00
Hannah Wolfe
6ff51ad44e Add support for zip import
fixes #4607

- moves file checks from db and upload API endpoints to api utils
- adds code to accept and then extract a zip and pull out a JSON file
- zip handling requires a lot of dependencies - this needs a good refactor
2014-12-10 20:21:06 +00:00
cobbspur
cd5d87ddf2 Return computed url with post object
closes #4445

- post model gets permalink format
- post model queries urlPathForPost to return computed url
- url helper modified to use post url
- urlForPost method abolished and replaced where necessary
- updated tests
2014-12-10 17:23:02 +00:00
Jacob Gable
ef16c67a15 Sort newest to oldest in sitemap files
Closes #4611

Refactored generateXmlFromNodes to pull the urlElements itself from
sorted values in the lookup

Added some checks to existing unit tests to validate ordering.
2014-12-09 12:41:31 -08:00
Hannah Wolfe
2ef77d69de Sitemaps correctly filter draft posts
fixes #4612

- adds missing line of code to remove draft posts
- adds tests to check drafts aren't added
2014-12-09 17:27:12 +00:00
Paul Adam Davis
4e6c867183 Change sitemap root location
Closes #4590

- Removes `-index` from the root sitemap
- Removes redirects (which send sitemap.xml to sitemap-index.xml)
- Adjust tests
2014-12-07 11:59:43 +00:00
Sebastian Gierlinger
658dea9e6b Merge pull request #4580 from ErisDS/footnote-excerpt
Strip footnotes from excerpts
2014-12-04 17:24:56 +01:00
Hannah Wolfe
591d653b36 Strip footnotes from excerpts
fixes #4572

- Remove both inline and bottom footnotes from excerpt output before stripping the remaining HTML
- No more red errors, black text or bold links in codemirror, as codemirror gets confused by footnote syntax. This is a step towards the new editor which has no syntax highlighting in the editor
2014-12-04 15:28:30 +00:00
Jason Williams
de20f3af2a Match labels with element ids.
Refs #4578
- Match label "for" attributes with ids from the inputs they're
  labeling.
- Remove extra promise generation from ghost header and footer helpers.
2014-12-04 15:21:27 +00:00
Sebastian Gierlinger
32959b2269 Merge pull request #4578 from ErisDS/pr-3489
Code Injection PR 3489 rebased and updated
2014-12-04 15:16:37 +01:00
Sebastian Gierlinger
0b2541b19f Merge pull request #4575 from ErisDS/highlight
Adds markdown highlight support
2014-12-04 15:00:01 +01:00
Hannah Wolfe
9783f16e76 Adds markdown highlight support
closes #4574

- adds highlight showdown extension with tests
2014-12-04 13:37:29 +00:00
Hannah Wolfe
904918d5cc Code Injection - adds perms, shortcuts, icon, flag
refs #1993

- adds ctrl/cmd+s for save
- adds config flag
- adds icon on settings page, puts items in the right order
- sorts out permissions for all settings pages with consistent configuration
2014-12-04 13:34:44 +00:00
Hannah Wolfe
818085f18c Add XSL for Sitemaps
fixes #4555

- There's no easy way to declare an XSL with the node xml module, so I
  needed to move the declarations to both be strings
- Ideally the code to serve the XSL would also be inside the sitemap
  module, but I think we need to refactor a bit to get there easily
- Added the XSL from #4559, with minor amends to make the tables and urls
  display correctly
2014-12-04 09:38:09 +00:00
Sebastian Gierlinger
319887c77b Merge pull request #4573 from ErisDS/limit-all-sitemaps
Add limit=all consistently to users, posts & tags
2014-12-04 09:45:33 +01:00
Stefan Baumgartner
60effc1b51 adds code injection admin frontend implementation, handlebar helpers + settings
escaping handlebars
2014-12-04 04:16:08 +00:00
Jason Williams
5f9620cde0 Merge pull request #4567 from cobbspur/imagesubdir
Fix image helper for subdirectories
2014-12-03 14:39:52 -06:00
cobbspur
5f07f5503e Fix image helper for subdirectories
closes #4566

- Url created within urlFor with image context rather than calling createUrl function
2014-12-03 20:19:22 +00:00
Hannah Wolfe
9b146e59bb Add limit=all consistently to users, posts & tags
refs #623, #4348

- this fixes sitemaps to list all posts, pages, tags and users
- makes the API behave consistently across all paginated resources
2014-12-03 18:46:26 +00:00
Hannah Wolfe
13757041d9 Merge pull request #4270 from mispy/footnotes2
Footnotes extension for Showdown
2014-12-03 13:38:47 +00:00
Sebastian Gierlinger
9b8141bb08 Merge pull request #4530 from ErisDS/issue-4498
API - no more m-2-m relation ids by default
2014-12-02 20:49:47 +01:00
Hannah Wolfe
4cb909542a API - no more m-2-m relation ids by default
closes #4498

- remove toJSON code which returns only IDs from objects
- don't auto-include tags & fields in post responses
- don't auto-include roles in user responses
- fix #allthethings that made assumptions about the auto-includes, or otherwise were only working because of the auto-include
2014-12-02 19:24:44 +00:00
Hannah Wolfe
89905a8e3c Merge pull request #4560 from cobbspur/labs
Move ugly debug to Settings  Labs
2014-12-02 10:34:17 +00:00
cobbspur
edfa74f349 Move ugly debug to Settings Labs
closes #4534

- Adds new Labs route
- Wires route in settings page
- Move and rename debug templates and logic to labs
- Redirect /debug to settings/labs
2014-12-01 19:19:08 +00:00
Hannah Wolfe
c06e649ab1 Merge pull request #4554 from sebgie/issue#3872
URL safe base64 encoding
2014-12-01 16:56:14 +00:00
Sebastian Gierlinger
9ddabffa10 URL safe base64 encoding
closes #3872
- updated base64 escaping to respect + and \
- updated base64 escaping to remove = during transport
- updated tests
2014-12-01 16:59:49 +01:00
Hannah Wolfe
aa44743c67 Merge pull request #4531 from Gargol/issue-4485
Cleans up HTML data attributes on body in default.hbs
2014-12-01 10:54:19 +00:00
Hannah Wolfe
d2d9e4aea2 Merge pull request #4348 from jgable/sitemaps
Generate sitemap.xml
2014-12-01 09:28:14 +00:00
Jacob Gable
fe7e4311f1 Update getting started link
No Issue

Fixed link anchor address that was changed
2014-11-30 20:52:37 -08:00
Jacob Gable
2cfa18475a Generate sitemap files
Closes #623

- Add basic init and eventing scaffold
- Add sitemap-index.xml generation
- Broke out generators to individual files, added request handler
- Add page, author and tag xml files; add index mapping
- Add SiteMapManager unit tests
- Add Generators tests
- Cache invalidation headers for sitemap-*.xml
- Redirect sitemap.xml to index and rename to sitemap-index
- Handle page convert and publish/draft changes
- Add very basic functional test for route existence
- Add cache headers to sitemap routes
2014-11-30 10:49:45 -08:00
Nazar Gargol
df5a598718 Cleans up HTML data attributes on body in default.hbs
closes #4485

- removes data attributes used on body in default.hbs
- introduces new way to generate configuration through meta tags
- config initializer consumes configurations from the meta tags using parser
- moves blog_title helper/value to be a property in a configuration api
2014-11-29 17:09:43 +01:00
Hannah Wolfe
423f0031f6 Merge pull request #4538 from jaswilli/config
Add Ghost version to config object.
2014-11-29 16:05:04 +00:00
Jason Williams
86cb690474 Merge pull request #4518 from ErisDS/rss-fixes
Change RSS content type & use absolute URL in meta
2014-11-28 13:07:07 -06:00
Hannah Wolfe
6f0bca8d57 Merge pull request #4522 from felixrieseberg/iss4487
Dynamic Titles in Ghost Admin
2014-11-28 19:06:44 +00:00
Jason Williams
1d562c8914 Add Ghost version to config object.
No Issue
- Use Ghost version value that is already loaded instead of
  reading package.json from the filesystem and parsing it on
  every call into the configuration API.
2014-11-28 18:08:50 +00:00
Felix Rieseberg
7c4381c812 Dynamic Titles in Ghost Admin
- Every route can set a title token that is combined with the blog’s
title, resulting in titles like ‘Content - Test Blog’.
- Subroutes are supported (‘Settings - General - Test Blog’)
- The blog’s name is applied to and taken from the `config` object to
spare Ember a REST call via `store.find(‘settings’)`.
- Tests have been changed to test for the new titles.
- The initially proposed solution
(https://github.com/paddle8/ember-document-title) doesn’t play nice
with EAK, which is why I went with this solution
(https://gist.github.com/machty/8413411) by Ember.JS core dev @Machty.
2014-11-27 15:41:00 -08:00
Jason Williams
50cb92d4fd Merge pull request #4512 from sanddudu/patch-3
Fix gravatarLookup method
2014-11-25 09:56:50 -06:00
sanddudu
904727a927 Fix gravatarLookup method
Closes #4511
- Add missing "return"
- Fix error handling
2014-11-25 21:30:53 +08:00
Hannah Wolfe
31ae0c6923 Change RSS content type & use absolute URL in meta
no issue

- changes the content type for the RSS feeds from text/xml to
  application/rss+xml
- changes the link rel=alternate tag to use an absolute URL for the feed
  in the blog meta data
2014-11-24 22:33:49 +00:00
Hannah Wolfe
af7bbb83e4 Merge pull request #4091 from hswolff/remove-a-cd
Removes objectTypeModelMap to reduce circular dependency.
2014-11-24 11:59:07 +00:00
Sebastian Gierlinger
3fd6c80bb7 Merge pull request #4490 from thisishugo/url-safe-tokens
Make tokens URL safe
2014-11-21 11:30:30 +01:00
Jason Williams
b31fec6e2f Fix updateConfigTheme method.
No Issue
- Fix exception being thrown when updateConfigTheme called before
  settingsCache fully populated.
- Remove unnecessary check in a conditional in the migration command
  builder.
2014-11-20 14:54:37 +00:00
Hugo Jobling
11a0f01e25 Make tokens URL safe
Base64 encoding causes some issues when the token is URL encoded
as the = symbol is not a valid URL character. We replace any =
symbols with a - as this is valid in a URL, but is guaranteed
not to appear in a base64 string. This fix ensures that Ghost
password resets work with mail providers such as Mailgun that
add their own tracking redirects

closes #3872 (for real this time)
2014-11-20 11:38:43 +00:00
Hannah Wolfe
1079ef8aeb Merge pull request #4466 from VictorVation/url-validation
Improve validation for user.website
2014-11-17 15:43:25 +00:00
Jason Williams
da095ba551 Merge pull request #4436 from mattiascibien/issue-4232
Do not eagerly fetch relations in when finding all posts
2014-11-17 09:36:42 -06:00
Victor Szeto
2e8e2ce367 Improve validation for user.website
closes #4444
- validate URL without protocol in server and client
- when saving url, add `http://` if the url doesn't have a protocol
2014-11-17 00:40:43 -05:00
Jason Williams
e499e5dda9 Fix invalid image helper URLs when using a subdir.
No Issue
- Strip sub-directory from image paths before passing to
  config.createUrl. Since images are stored with the sub-directory
  and createUrl builds a URL with the sub-directory the result
  would be a URL that contains the sub-directory twice.
2014-11-17 05:32:51 +00:00
Jason Williams
cb544d7e81 Clean up whitespace from #4349. 2014-11-16 18:14:18 +00:00
Matt Enlow
39bf4ed9eb Merge pull request #4349 from yurynix/master
Workaround for outlook, who doesn't like quoted-printable encoding
2014-11-16 09:28:49 -07:00
Jason Williams
15fe121490 Fix gravatar request url.
Refs #4367
- 'http:' was accidentally left out when passing the gravatar
  URL into request, and request requires the full scheme to be present.
2014-11-16 04:33:33 +00:00
Hannah Wolfe
d3f70e3b24 Update showdown to showdown-ghost 0.3.4
closes #2675

- update showdown to the newly published showdown-ghost module which has a fix for the lack of language support in codeblocks
2014-11-15 16:37:35 +00:00
Sebastian Gierlinger
819a978192 Merge pull request #4406 from RaoHai/tag-endpoints
full BREAD Tag endpoints and Tag api tests
2014-11-13 19:25:36 +01:00
Mattias Cibien
8997cd0ffc Do not eagerly fetch relations in when finding all posts
fixes #4232
- do not fetch tags and fields relations in post.findAll()
2014-11-13 11:01:28 +01:00
Jason Williams
a2e670cb0b Merge pull request #4320 from felixrieseberg/iss4235
Work with case-sensitive email addresses
2014-11-12 19:35:38 -06:00
Felix Rieseberg
af1d2201b0 Work with case-sensitive email addresses
Closes #4235
2014-11-12 17:18:53 -08:00
surgesoft
d9643ed2f4 full BREAD Tag endpoints and Tag api tests
close #4263
- implemented full BREAD Tag API
- deleting a tag will also detach its relations to posts
- tests of Tag API
2014-11-13 00:44:36 +08:00
Jason Williams
9ca6a816aa Drop socket reference on close.
Closes #1976
- Prevent the unbounded memory growth caused by maintaining
  a reference to the socket object that is created on every connection.
2014-11-11 19:23:07 +00:00
Jaiden Mispy
31eea94b18 Add footnotes extension to showdown
refs 1318
- based on Markdown Extra https://michelf.ca/projects/php-markdown/extra/
- allows [^n] for automatic numbering based on sequence
2014-11-11 19:24:04 +11:00
Harry Mills
edef05339e Adds SIGTERM handling
closes #4403
- adds SIGTERM handler to match SIGINT handler
2014-11-05 15:38:35 +00:00
Jason Williams
d5f13e1510 Merge pull request #4384 from meowtec/fix-error-log
fix bug in which `logError` could not resolve an err without `message`
2014-11-04 23:20:47 -06:00
meowtec
d42703dd9f Correct logError to log err which has undefined message
closes #4384
 - if err is `object` && `err.message` isNOT `string`, let err = `An unknown error occurred.`
2014-11-05 11:03:33 +08:00
cobbspur
69d4852a6d Create Tags Management Stubs for Ember
closes #4260

- Adds "tags" route inside of the settings routes.
- Adds this route to router.js
- Links the route from the settings.hbs template
- Adds demo tags html in tag.hbs template
- Adds flag for tagsUI
2014-11-04 15:50:41 +00:00
Hannah Wolfe
67e33a65e8 Merge pull request #4317 from cobbspur/image
Created image helper with absolute url option
2014-11-03 15:21:35 +00:00
Hannah Wolfe
fe659117bc Merge pull request #4155 from jgable/importDuplicates
Remove duplicate posts and tags on import
2014-11-03 15:03:44 +00:00
Jason Williams
8249d88cdd Timeout after two seconds on gravatar lookup.
Refs #4277
- Switch from the built-in http module to request and set
  a timeout of 2 seconds on gravatar lookup requests.
- Move request package from devDependencies to dependencies.
2014-10-30 20:01:11 +00:00
Yury Michurin
198017d1a7 Workaround for outlook, who doesn't like quoted-printable encoding
For example, outlook 2013 plus would not interpert the following html
(encoded via quoted-printable encoding):
<a href=3D=22http://engineering=
.como.com/ghost/signup/MTQxNTcwNzM5MTYwN3x5dXJ5QG5peC5jby5pbHx3NVBmUUN4RGZr=
cGhKc3FPOElybXNZNWtzR0FMTU9tRFI5UlNyRWQ4SGJZPQ=3D=3D/=22 style=3D=22color:
=

The workournd forces node-mailer to user base64, which outlook understands
well.
2014-10-28 15:03:32 +02:00
cobbspur
4a56d10c86 Created image helper with absolute url option
closes #4231

- Adds {{image}} helper
- Adds image_spec test unit
- Updated {{ghost_head}} to use image helper
2014-10-28 13:14:41 +02:00
Hannah Wolfe
dbf055907a Merge pull request #4338 from felixrieseberg/iss3858
Enable :author as permalink option
2014-10-28 12:58:39 +02:00
Harry Wolff
6cbcfac72b Removes objectTypeModelMap to reduce circular dependency.
refs #2455

- also note areas where we still have lazy loading of modules.
- moves one lazy loading to non-lazy require.
2014-10-27 20:48:22 -04:00
Jacob Gable
5de5cfe7a1 Remove duplicate posts and tags on import
Issue #806

- Modify sanitize to check for duplicate posts and tags
- Update posts_tags when referencing removed duplicate tags
- Return both data and problems from importData
- Add tests for duplicate posts and tags with fixtures
2014-10-27 18:20:32 -05:00
Felix Rieseberg
c7ad09aace Enable :author as permalink option
Closes #3858
- urlPathForPost is now aware of the author’s slug, allowing for the
permalink setting to use :author
- Frontend controller only renders posts that have the specified
author, if one is given
- Extensive tests included
2014-10-25 18:15:24 -07:00
cobbspur
5aac6d6d69 Escapes strings
closes #4328

- Escapes metaTitle, metaDescription, blog url, blog title, tags
- Updates tests
- Adds test for metaTitle and metaDescription with double quotes
2014-10-24 19:22:37 +02:00
Leonard Camacho
a6a02f31ad Fix no show of default Twitter card
No issue
- change default Twitter card from content to summary
2014-10-22 20:49:06 -04:30
Jilles Soeters
090dc297eb Set link[prev/next] tag to https if urlSSL is set
The <link> tag for next/previous in the head doesn't update when the normal URL and the urlSSL change. This fixes that bug.

Fixes #4266
2014-10-17 20:27:01 +01:00
cobbspur
23e98aa8dc Adds twitter cards and schema.org to {{ghost_head}}
closes #3900

- Adds twitter cards to ghost head helper
- Adds schema json information
- Adds test with null values for post image and cover image
- Adds test for privacy flag
- Adds test for the case of no tags
- Updates test to check for twitter card and schema data
- Updates privacy.md
- Fixes issue with image urls that are linked by url rather than uploaded
2014-10-17 17:26:14 +02:00
Hannah Wolfe
d44a97405b Merge pull request #4220 from felixrieseberg/iss4211
Shorter user slugs (if possible)
2014-10-16 21:23:50 +03:00
Hannah Wolfe
2c6d43a0c0 Refactor helpers & tests into individual files
no issue

- Split theme helpers into individual files for each
- Do the same for tests
- Have utils to share some things between them
- Move assetHash onto config
2014-10-14 22:52:40 +02:00
Matt Enlow
f518782c3c Merge pull request #4269 from javorszky/iss4189
Abstracting away the deprecatedItems
2014-10-13 09:28:14 -06:00
Felix Rieseberg
7bb38f8c7b Accept Invitation: Generate Slug from Name
No issue, but ref #4211
2014-10-13 08:35:08 -04:00
Gabor Javorszky
938b098329 Abstracting away the deprecatedItems
Closes #4189

* moved `deprecatedItems` from within the function to the default config object
* addes tests
2014-10-12 23:04:39 +01:00
cobbspur
487297ff81 Added open graph tags for ghost head helper
issue #3900
- uses isPrivacyDisabled helper to see if useStructuredData has been disabled in config.js
- adds an array of promises to deal with asynchronous data
- resolves asynchronous data then adds open graph tags after canonical link
- featured image and tags are only added if present
- open graph tags only added on post and page
- adds unit test to check correct data is returned
- updates other unit tests to reflect changes
2014-10-08 15:57:49 +01:00
Jason Williams
696fbaaee4 Follow symlinks when resolving theme paths.
Closes #4225
- If a theme is symlinked in the themes directory, follow
  the symlink so that the theme object is populated correctly.
- Only do the fallback loading of theme data in the validations
  module if it doesn't exist in config.
2014-10-02 13:37:18 +00:00
Felix Rieseberg
0025f3d6de Shorter user slugs (if possible)
Closes #4211
2014-10-01 23:27:21 +02:00
John O'Nolan
12f92cd027 Merge pull request #4210 from JohnONolan/fix-copy
[WIP] Fixed email copy grammatical errors
2014-09-30 20:26:11 +02:00
Hannah Wolfe
4e58198381 Merge pull request #4188 from halfdan/1891-move
Abstract the allowed file types out of API
2014-09-29 21:31:22 +01:00
John O'Nolan
71f4b40b2e Fixed email copy grammatical errors 2014-09-29 16:04:02 +02:00
Fabian Becker
72b0a48483 Fix DB API
no ref
- Use correct error type
2014-09-28 19:38:41 +00:00
Fabian Becker
55293d0d1e Abstract the allowed file types out of API
closes #1891
- Moves contentType and extension check to config
2014-09-26 13:31:23 +00:00
Fabian Becker
1d1f24d3d4 Properly server shared files
refs #3992
- Don't use path.join for URLs
- Cache robots.txt for 1h instead of 1y
2014-09-25 14:14:20 +02:00
Hannah Wolfe
e5e7488d4d Fix cache-control header for API routes
closes #4157

- adds cache-control header back to api routes
- moves cache rules object into testUtils
- adds cache-control header test to every existing API test
2014-09-25 11:06:28 +01:00
Jason Williams
485c296c29 Merge pull request #4127 from ErisDS/msg-update
Updating messages to use errors module
2014-09-23 14:48:40 -05:00
Hannah Wolfe
0f6649cc1d Updating messages to use errors module
no issue

- only updated the messages that are errors or warnings
- changed the structure of the messages to follow the 3-arg format
2014-09-23 19:55:07 +01:00
Hannah Wolfe
d1abc6c0f2 Merge pull request #3962 from halfdan/2249-is-context
Implements is-helper
2014-09-23 17:05:13 +01:00
Hannah Wolfe
792e748e2f Merge pull request #4093 from halfdan/update-helpers
Update meta_* helpers.
2014-09-23 15:28:24 +01:00
Fabian Becker
801c5248c2 Update meta_* helpers.
no ref
- Return meta_description from post.meta_description if set
- Return meta_title either from post.title or post.meta_title if set
- Adds tests
2014-09-23 14:06:52 +02:00
Fabian Becker
aa5cf6ed3b Implements is-helper
closes #2249
- Added context to res.locals
- Added context aware is helper
- Added unit tests
2014-09-23 11:31:16 +02:00
Gabor Javorszky
1f5a378b4c Deprecated mail.fromaddress, mail.from is Title <email@address>
Closes #4018

* cleaned up `mail_spec.js`
* deprecated `mail.fromaddress`
* implemented 'Blog title <email@address.com>' format with fallbacks
* added tests to deprecation and from address, made existing ones more robust
* moved domain intuit into its own module: `GhostMailer.getDomain()`
2014-09-23 09:33:20 +01:00
Gabor Javorszky
b3820fbb31 More robust deprecation check code
Closes #4082
* reformatted code to allow for traversal
* deeper config items should be denoted like this: `object.object.object.property`.
* added tests for testing the deprecation warnings
2014-09-23 09:33:20 +01:00
Jason Williams
410dc39f3e Add checks for packages and contentPath to startup
Refs #3864
- Make sure that require() is able to resolve all dependencies
  listed in package.json.  If packages are missing halt the
  bootstrap process and display an error and help message for user.
- Check that contentPath and its subdirectories exist with the correct
  permissions.
- Check sqlite3 database file is set for read/write access.
2014-09-22 21:27:34 +00:00
Hannah Wolfe
9f7d008f47 Merge pull request #4074 from halfdan/4069-rename
Naming cleanup
2014-09-22 22:21:46 +01:00
Fabian Becker
2c3abeee03 Naming cleanup
closes #4069
- Rename everything from camelCase to lowercase + dashes
- Remove usage of `server`, `app` and `instance`
2014-09-20 21:09:16 +02:00
Fabian Becker
b7be4adede Change HTML email link to hide token
closes #3305
- Hide token in HTML email
2014-09-20 11:08:27 +00:00
Hannah Wolfe
a3093b9b42 Merge pull request #4075 from jaswilli/morgan
Adjust morgan call to avoid deprecation warning
2014-09-19 20:39:05 +01:00
Fabian Becker
3e6d11e8fa Fix ghost-ui reference
fixes #4072
- Correct reference to ghost.min.css
2014-09-19 18:31:21 +00:00
Jason Williams
12957b1918 Adjust morgan call to avoid deprecation warning
No Issue
- Change the invocation of the morgan logging package to
  conform to the new function signature introduced in
  morgan 1.2.0.
2014-09-19 16:31:22 +00:00
Hannah Wolfe
5cdb6510ae Merge pull request #4065 from jaswilli/transition
Prevent transition to signup on invalid invitation
2014-09-19 17:17:13 +01:00
Hannah Wolfe
cb9d9b748a Merge pull request #4062 from halfdan/4059-skip-not-found
Ignore unknown setting keys on import
2014-09-19 16:54:35 +01:00
Fabian Becker
0efb449103 Delay updateCheck to +24h on error
fixes #4036
- delay update check by 24h when an error happens
- set connection timeout to 10 seconds
2014-09-19 17:10:30 +02:00
Fabian Becker
9394fad6aa Have /ghost use its own express instance
closes #1961
- Refactor admin to use its own express instance
- Refactor middlewares to work with /ghost mounted admin express instance
2014-09-19 08:57:13 +00:00
Jason Williams
63546be1eb Prevent transition to signup on invalid invitation
Refs #3876
- Prevent signup page from flashing when an invalid invitation
  token is used.
- Clear sensitive information from signup controller.
- Make isInvitation API behavior consistent with other auth
  related APIs.
2014-09-19 04:52:45 +00:00
Matt Enlow
9fb038f8d3 Merge branch 'pr/3876'
* pr/3876:
  Redirect user if signup invitation isn't valid
2014-09-18 19:22:39 -06:00
Felix Rieseberg
b1c1b03015 Redirect user if signup invitation isn't valid
Closes #3565
- Added server API isInvitation (analog to isSetup), checking if an
invitation exists for a given email address.
- If the invitation is no longer valid (or didn’t exist in the first
place), the user is redirected and an error notification is shown.
2014-09-18 19:11:40 -06:00
Matt Enlow
a4de40abc6 Merge pull request #3976 from halfdan/1889-generate-slug
Cleanup reserved words in generateSlug
2014-09-18 18:54:48 -06:00
Matt Enlow
a5f4fca7b2 Merge pull request #3992 from halfdan/favicon
Let Ghost serve favicon instead of using dependency
2014-09-18 18:40:22 -06:00
Fabian Becker
4cc1f509ac Ignore unknown setting keys on import
fixes #4059
- Ignore NotFound setting keys
2014-09-18 12:48:18 +00:00
Fabian Becker
c9b0df752f Cleanup reserved words in generateSlug
closes #1889
- Adds a new filter for slugs
- Move slugs to config.slugs
2014-09-18 13:56:51 +02:00
Fabian Becker
f2fcb5b62b Let Ghost serve favicon instead of using dependency
no ref
- Remove static-favicon dependency
- Refactor robots.txt middleware to also serve favicon
- Add ETag
2014-09-18 13:51:41 +02:00
Hannah Wolfe
aad595de7d Updating express to 4.9.2 & related packages
ref #3795

- express updated to 4.9.2
- express 4.9.0 introduced res.sendStatus() to replace res.status().end()
- we no longer need express-session, connect or cookie-parser
- body-parser, busboy, compression, express-hbs, morgan, all bumped to
  latest versions as well - there doesn't seem to be any breaking changes
2014-09-18 11:50:28 +01:00
Harry Wolff
469aaa398c Add jscs task to grunt file and clean up files to adhere to jscs rules.
resolves #1920

- updates all files to conform to style settings.
2014-09-17 21:44:29 -04:00
Harry Wolff
457f360765 Updates image upload directories to be number based.
resolves #2285

- Moves to using moment.format('MM') to use the date formatting of a month
2014-09-16 13:23:29 -04:00
Paul Davis
fcab1a961b Merge pull request #4033 from halfdan/getting-typos
Fix Markdown help modal table positioning
2014-09-16 16:36:53 +01:00
Hannah Wolfe
b7fdf7d872 Merge pull request #3947 from hswolff/goodbye-config-theme
Removes config.theme and restructures how theme variables are cached
2014-09-15 21:30:44 +01:00
Hannah Wolfe
aa0d9fda46 Merge pull request #4025 from mvalipour/master
URL replacement in RSS feed mucks with content
2014-09-15 20:35:18 +01:00
Jason Williams
d93bf82795 Merge pull request #4005 from ErisDS/dbhash-first-run
Fixes the first run messages
2014-09-15 08:28:06 -05:00
Hannah Wolfe
b890f31d98 Fixes the first run messages
no issue

- Whilst testing the mail PR #3915 I noticed the first run messages aren't
  appearing because the dbHash is getting pre-populated, but there doesn't
  appear to be a reason why this is necessary
2014-09-15 09:49:25 +01:00
Fabian Becker
7830d68000 Fix Markdown help modal table positioning
no ref
- Fix top spacing of markdown table
- Fix width of table and left align table head
- Fix grammar, whitespace in getting-started post
2014-09-15 09:56:54 +02:00
Hannah Wolfe
7b71d0cbc2 Merge pull request #3948 from hswolff/refactor-storage-module
Moves storage module to use prototypes for inheritance and structure.
2014-09-14 11:16:01 +01:00
Mo Valipour
98d0954e32 Fix URL replacement in RSS feed mucking with content
closes #3983
- removed naive regex implementation
- added cheerio to project dependencies
- used cheerio to parse RSS content
- use attribute getter/setter to replace href/src attribute urls with the resolved version
2014-09-13 18:11:07 +01:00