Commit Graph

578 Commits

Author SHA1 Message Date
Katharina Irrgang
32a5982430 utf8mb4 support (#7409)
closes #5519, closes #6197

- default encoding is utf8mb4 instead of utf8
- support emojis
- read here why: http://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
- read here why: https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-conversion.html
2016-09-20 15:59:34 +01:00
Hannah Wolfe
9a520f39fb 🎨 Preparation for going alpha (#7404)
- Don't let people start Ghost Alpha with non-alpha databases.
- Provide a new welcome message for development mode (a little bit of positive reinforcment)
- Provide a RED WARNING when in production mode (will still be used for developing, but we can ignore)
- Change package.json to 1.0.0-alpha.0, we won't relelase this, will bump to .1 for release
2016-09-20 15:59:34 +01:00
Austin Burdine
25a9b4aa3a 🔥 remove preinstall node version check (#7403)
no issue
- this is now handled in Ghost-CLI
2016-09-20 15:59:34 +01:00
kirrg001
8115d83782 🔥 remove postgres support
refs #1333, refs #5878, refs #5321
2016-09-20 15:59:34 +01:00
kirrg001
6275fdbb25 🔥 remove node 0.10 support, add node 6 support
refs #6899, refs #7098
2016-09-20 15:59:34 +01:00
kirrg001
03cc8ea3ff 🛠 add nconf as dependency
refs #6982
[ci skip]
2016-09-20 15:59:34 +01:00
Greenkeeper
a98e134fe4 chore(package): update sinon to version 1.17.6 (#7401)
https://greenkeeper.io/
2016-09-19 14:42:22 +01:00
Greenkeeper
b61e870737 chore(package): update tmp to version 0.0.29 (#7397)
https://greenkeeper.io/
2016-09-19 14:42:13 +01:00
Greenkeeper
9ca83b9875 chore(package): update jsonpath to version 0.2.7 (#7285)
https://greenkeeper.io/
2016-09-19 14:42:03 +01:00
Greenkeeper
b5ef1da584 chore(package): update validator to version 5.7.0 (#7356)
https://greenkeeper.io/
2016-09-19 13:51:36 +01:00
Greenkeeper
0af5f5960a chore(package): update istanbul to version 0.4.5 (#7239)
https://greenkeeper.io/
2016-09-19 13:51:25 +01:00
Greenkeeper
fe19b26e44 chore(package): update bluebird to version 3.4.6 (#7311)
https://greenkeeper.io/
2016-09-19 12:38:57 +01:00
Greenkeeper
4b61dd8971 chore(package): update cheerio to version 0.22.0 (#7260)
https://greenkeeper.io/
2016-09-19 12:32:40 +01:00
Greenkeeper
db7d87c249 chore(package): update archiver to version 1.1.0 (#7287)
https://greenkeeper.io/
2016-09-19 12:31:47 +01:00
Greenkeeper
f64c13af36 chore(package): update csv-parser to version 1.11.0 (#7238)
https://greenkeeper.io/
2016-09-19 11:25:37 +01:00
Hannah Wolfe
fbb60adde7 Version bump to 0.11.0 2016-09-15 10:23:15 +01:00
Greenkeeper
1dc3ca354f chore(package): update gscan to version 0.0.15 (#7386)
https://greenkeeper.io/
2016-09-14 22:47:28 +01:00
Hannah Wolfe
a40ff3b276 🎨 Return gscan warnings from theme API (#7367)
- return warnings from gscan so we can let users know about potential issues
2016-09-14 18:49:41 +01:00
Hannah Wolfe
8d7254aca5 ⬆️ Upgrade extract-zip to extract-zip-fork@1.5.1 (#7383) 2016-09-14 17:13:36 +00:00
Greenkeeper
a9561cfbd7 chore(package): update netjet to version 1.1.3 (#7274)
https://greenkeeper.io/
2016-09-14 15:59:54 +01:00
Greenkeeper
ae18a48b35 chore(package): update express-hbs to version 1.0.3 (#7301)
https://greenkeeper.io/
2016-09-14 15:50:35 +01:00
Hannah Wolfe
e0970bff8e 🛠 Pin knex, bookshelf & lodash until later (#7375)
refs #7189, refs #7291

- We will upgrade these when we are able to locate and resolve the memory leak that is caused by upgrading them
2016-09-14 14:23:38 +02:00
Greenkeeper
0c628049fb chore(package): update moment to version 2.15.0 (#7364)
https://greenkeeper.io/
2016-09-14 13:22:03 +01:00
Greenkeeper
177c0fba07 chore(package): update cors to version 2.8.1 (#7343)
https://greenkeeper.io/
2016-09-14 13:16:18 +01:00
Aileen Nowak
a4427952e2 ⬆️ 🚨 Update Amperize dep and fix test (#7374)
no issue

Updates Amperize dep to v0.3.1 and fixes test for `amp_content`.
2016-09-14 12:30:37 +01:00
Katharina Irrgang
8c1e5fbc61 🐛 add missing dependency lodash.orderBy (#7333)
no issue
2016-09-14 11:22:16 +01:00
Hannah Wolfe
fe321a15c6 Version bump to 0.10.1 2016-09-06 17:15:49 +02:00
Hannah Wolfe
a5c0dd1dd1 ⬆️ Updating extract-zip to bugfixed version (#7331)
- This version has a fix for maxogden/extract-zip#30, where directories are not always identified correctly
2016-09-06 17:15:07 +02:00
Aileen Nowak
b3b1bcca94 🐛 Return reg. HTML on Amperize time-out (#7324)
no issue

`{{amp_content}}` helper can handle error now, if returned from `Amperize` module. In case of on error, we return the unprocessed HTML, which will then get validated by the `Sanitize` functionality.

The unprocessed HTML will be stored in the cache, until the post is updated.

Points to Amperize fork of AileenCGN as dependency to have include the error handling changes incl. timeouts.
2016-09-06 15:29:21 +02:00
Greenkeeper
4e6b1d7471 chore(package): update gscan to version 0.0.13 (#7328)
https://greenkeeper.io/
2016-09-06 10:45:52 +02:00
Greenkeeper
c80f481b95 chore(package): update gscan to version 0.0.12 (#7307)
https://greenkeeper.io/
2016-09-01 13:42:00 +02:00
Katharina Irrgang
54559f24f9 fix: memory leak (#7291)
closes #7189

- downgrade lodash to 3.x
- downgrade bookshelf to 0.9.x
- downgrade knex to 0.10.x
- keep lodash 4.x functions
2016-09-01 10:53:08 +02:00
kirrg001
6dfca64521 Version bump to 0.10.0 2016-08-29 19:12:46 +02:00
Aileen Nowak
9d76004807 🛠 Change Amperize dep (#7271)
no issue

Changes the Amperize module to point at tarball
2016-08-25 18:48:33 +02:00
Aileen Nowak
93ee19f36e 🐛 fix: make small media types not stretch (#7265)
no issue

Fixes a bug with displaying small media types like images or gif. Two reasons for that:
1. In many cases, we only have the relative URL instead of the absolute URL for the media source and therefore, `Amperize` module wasn't able to detect the image size and set the default image size of `width="600"` and `height="400"`.
2. Even if we have detected the correct image size, the attribute `layout="default"` would still make it strech. This issue is fixed in `Amperize`, but it wasn't merged at this time, so I set the dependency on my fork.

Adds `amp-anim` to the `.post-content` class, to have same CSS style as an image.
2016-08-25 11:09:25 +02:00
Hannah Wolfe
545d2cb8b0 Use node-archiver to create zips (#7268)
closes #7266, closes #7267

- Adds node-archiver as a dependency
- Adds new zip-folder utility
- Switch out exec 'zip' for zip folder utility
- Store generated zips in os.tmpdir
- Don't delete zips from content/themes when uploading or deleting
- Fixes path resolution for delete
2016-08-25 09:22:22 +02:00
Greenkeeper
01bac00e61 chore(package): update gscan to version 0.0.11 (#7259)
https://greenkeeper.io/
2016-08-24 14:45:37 +02:00
Katharina Irrgang
a91e54cf1a feature: theme upload/download/delete (#7209)
refs #7204

- added 3 new themes permissions
- change core/client
- add theme upload/download logic
- extended local file storage to serve zips
- added gscan dependency
- add ability to handle the express response within the api layer
- restrict theme upload to local file storage
- added 007 migration
2016-08-23 13:07:25 +01:00
Katharina Irrgang
f174d4d56b Revert "Update supertest to version 2.0.0 🚀" (#7243) 2016-08-22 19:53:45 +02:00
Aileen Nowak
a5c29dfc34 [FEATURE] AMP (#7229)
closes #6588, #7095

* `ImageObject` with image dimensions (#7152, #7151, #7153)
- Returns meta data as promise
    - returns a new Promise from meta data
    - uses `Promise.props()` to resolve `getClient()` and `getMetaData()`

- Adds 'image-size' util
The util returns an object like this
```
{
    height: 50,
    url: 'http://myblog.com/images/cat.jpg',
    width: 50
};
```
if the dimensions can be fetched and rejects with error, if not.
In case we get a locally stored image or a not complete url (like `//www.gravatar.com/andsoon`), we add the protocol to the incomplete one and use `urlFor()` to get the absolute URL. If the request fails or `image-size` is not able to read the file, we reject with error.
- adds 'image-size' module to dependencies
- adds `getImageSizeFromUrl` function that returns image dimensions

- In preparation of AMP support and to improve our schema.org JSON-LD and structured data, I made the following changes:
    - Changes the following properties to be `Objects`, which have a `url` property by default and a `dimensions` property, if `width` and `height` are available:
        - `metaData.coverImage`
        - `metaData.authorImage`
        - `metaData.blog.logo`
    - Checks cache by calling `getCachedImageSizeFromUrl`. If image dimensions were fetched already, returns them from cache instead of fetching them again.
    - If we have image dimensions on hand, the output in our JSON-LD changes from normal urls to be full `ImageObjects`. Applies to all images and logos.
    - Special case for `publisher.logo` as it has size restrictions: if the image doesn't fulfil the restrictions (<=600 width and <=60 height), we simply output the url instead, so like before.
    - Adds new property for schema.org JSON-LD: `mainEntityOfPage` as an Object.
    - Adds additional Open Graph data (if we have the image size): `og:image:width` and `og:image:height`
    - Adds/updates tests

* AMP router and controller (#7171, #7157)
Implements AMP in `/apps/`:
- renders `amp.hbs` if route is `/:slug/amp/`
- updates `setResponseContext` to set context to `['amp', 'post']` for a amp post and `['amp', 'page']` for a page, but will not render amp template for a page
- updates `context_spec`
- registers 'amp' as new internal app
- adds the `amp.hbs` template to `core/server/apps/amp` which will be the default template for AMP posts.
- adds `isAmpURL` to `post-lookup`

* 🎨 Use `context` in meta as array (#7205)
Instead of reading the first value of the context array, we're checking if it includes certain context values.
This is a preparation change for AMP, where the context will be delivered as `['amp', 'post']`.

*  AMP helpers (#7174, #7216, #7215, #7223)
- Adds AMP helpers `{{amp_content}}`, `{{amp_component}}` and  `{{amp_ghost_head}}` to support AMP:
- `{{amp_content}}`:
    - Adds `Amperize` as dependency
    - AMP app uses new helper `{{amp_content}}` to render AMP HTML
    - `Amperize` transforms regular HTML into AMP HTML
    - Adds test for `{{amp_content}}` helper
    - Adds 'Sanitize-HTML` as dependendy
    - After the HTML get 'amperized' we still might have some HTML tags, which are prohibited in AMP HTML, so we use `sanitize-html` to remove those. With every update, `Amperize` gets and it is able to transform more HTML tags, they valid AMP HTML tags (e. g. `video` and `amp-video`) and will therefore not be removed.
- `{{amp_ghost_head}}`:
    - registers `{{amp_ghost_head}}` helper, but uses `{{ghost_head}}` code
    - uses `{{amp_ghost_head}}` in `amp.hbs` instead of `{{ghost_head}}`
- `{{ghost_head}}`:
    - Render `amphtml` link in metadata for post, which links to the amp post (`getAmpUrl`)
    - Updates all test in metadata to support `amp` context
    - Changes context conditionals to work with full array instead of first array value
    - Adds conditionals, so no additional javascript gets rendered in `{{ghost_head}}`
    - Removes trailing `/amp/` in URLs, so only `amphtml` link on regular post renders it
    - Adds a conditional, so no code injection will be included, for an `amp` context.
- `{{amp_components}}`:
    - AMP app uses new helper `{{amp_components}}` to render necessary script tags for AMP extended components as `amp-iframe`, `amp-anime` and `amp-form`
    - Adds test for `{{amp_components}}`
2016-08-22 18:49:27 +02:00
Greenkeeper
3c13c98d7f chore(package): update supertest to version 2.0.0 (#7159)
https://greenkeeper.io/
2016-08-22 18:38:41 +02:00
Greenkeeper
61d66a4007 chore(package): update oauth2orize to version 1.5.0 (#7226)
https://greenkeeper.io/
2016-08-19 07:34:18 +01:00
Greenkeeper
e0f83f31ac chore(package): update oauth2orize to version 1.4.1 (#7211)
https://greenkeeper.io/
2016-08-17 18:24:19 +02:00
Greenkeeper
49e77711df chore(package): update should to version 11.1.0 (#7201)
https://greenkeeper.io/
2016-08-15 09:24:46 +02:00
Greenkeeper
749e906556 chore(package): update superagent to version 2.2.0 (#7200)
https://greenkeeper.io/
2016-08-15 09:24:31 +02:00
Greenkeeper
55e7b659e0 chore(package): update grunt-shell to version 1.3.1 (#7198)
https://greenkeeper.io/
2016-08-13 06:39:42 -06:00
Greenkeeper
d1b17f86d0 chore(package): update lodash to version 4.15.0 (#7197)
https://greenkeeper.io/
2016-08-12 22:16:39 -06:00
Greenkeeper
dd5775c018 Update mocha to version 3.0.2 🚀 (#7165)
* chore(package): update mocha to version 3.0.2

https://greenkeeper.io/

* fix duplicate done/promise handling
2016-08-11 08:51:19 +01:00
Austin Burdine
cd4fb88236 deps: knex@0.11.10 (#7195)
- add `useNullAsDefault` flag to sqlite test config to fix breaking
  sqlite builds
- fixes npm install issue with lodash dependency
2016-08-11 08:40:51 +01:00
Greenkeeper
da52e92f3e chore(package): update should to version 11.0.0 (#7193)
https://greenkeeper.io/
2016-08-10 14:37:09 -06:00