Commit Graph

554 Commits

Author SHA1 Message Date
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
Greenkeeper
c4c3978e39 chore(package): update grunt-mocha-istanbul to version 5.0.2 (#7181)
https://greenkeeper.io/
2016-08-10 12:09:59 -06:00
Greenkeeper
ff05ff2043 chore(package): update lodash to version 4.14.2 (#7188)
https://greenkeeper.io/
2016-08-10 10:27:40 -06:00
Austin Burdine
03d4137b86 Move remainder of ember tasks to client repo (#7172)
* Updating Ghost-Admin: Gruntfile work

* move remainder of ember tasks to client repo

refs #6977
- move ember build tasks to client repo
- remove unneeded dependencies
2016-08-07 11:53:28 +02:00
Greenkeeper
bd2f59b5f9 chore(package): update multer to version 1.2.0 (#7176)
https://greenkeeper.io/
2016-08-06 10:30:30 +02:00
Greenkeeper
6cab400b69 chore(package): update gh-contrib-list to version 0.1.2 (#7126)
https://greenkeeper.io/
2016-08-01 09:21:38 -06:00
Greenkeeper
ce615a0244 chore(package): update sinon to version 1.17.5 (#7148)
https://greenkeeper.io/
2016-08-01 08:13:14 -06:00
Greenkeeper
cefec5767d chore(package): update lodash to version 4.14.1 (#7160)
https://greenkeeper.io/
2016-07-29 18:02:40 -06:00
Greenkeeper
26eff9be8f chore(package): update lodash to version 4.14.0 (#7128)
https://greenkeeper.io/
2016-07-28 10:21:56 -06:00
Greenkeeper
81b2e4bc42 chore(package): update moment-timezone to version 0.5.5 (#7150)
https://greenkeeper.io/
2016-07-27 10:59:07 -06:00
Kevin Ansfield
e203eb8fb3 Version bump to 0.9.0 2016-07-26 14:24:31 +01:00
Austin Burdine
77464c59bd improve Ghost contributor tooling (#7042)
refs #6977
- update client ref
- add gh-contrib-list dependency
- remove buildAboutPage task
2016-07-22 12:53:48 +01:00
Greenkeeper
449b1ce01c chore(package): update netjet to version 1.1.2 (#7114)
https://greenkeeper.io/
2016-07-21 17:55:02 -06:00
Greenkeeper
0cf7dda884 chore(package): update validator to version 5.5.0 (#7112)
https://greenkeeper.io/
2016-07-21 07:08:19 -06:00
Greenkeeper
5e6b952e90 chore(package): update superagent to version 2.1.0 (#7090)
https://greenkeeper.io/
2016-07-20 05:25:56 -06:00
greenkeeperio-bot
879629a015 chore(package): update express to version 4.14.0
https://greenkeeper.io/
2016-07-19 17:04:34 +01:00
Greenkeeper
717183a3bb chore(package): update grunt-contrib-uglify to version 2.0.0 (#7111)
https://greenkeeper.io/
2016-07-19 10:04:20 -06:00
Greenkeeper
3b6326ec8b chore(package): update oauth2orize to version 1.4.0 (#7108)
https://greenkeeper.io/
2016-07-18 17:27:54 -06:00
Greenkeeper
94a5f618bf chore(package): update should to version 10.0.0 (#7104)
https://greenkeeper.io/
2016-07-18 09:14:33 -06:00
Hannah Wolfe
37da544dcc Node version check w/o semver (#7097)
closes #6691

- removes dependency on semver & package.json in preinstall script
- has a simplified proxy of semver to look for the right version numbers
2016-07-16 01:20:05 +02:00
Greenkeeper
00a676110d chore(package): update semver to version 5.3.0 (#7094)
https://greenkeeper.io/
2016-07-15 12:07:07 +01:00
Greenkeeper
9f547b640f chore(package): update ghost-gql to version 0.0.5 (#7092)
https://greenkeeper.io/
2016-07-14 15:07:10 +01:00
Hannah Wolfe
71282a241e Various post-repo-split cleanup (#6910)
no issue

- remove bower from dependencies, greenkeeper ignores & .editorconfig
- remove old custom jscs rule for ember
2016-07-12 11:55:46 -06:00
Greenkeeper
7b0226247b chore(package): update express-hbs to version 1.0.2 (#7078) 2016-07-08 21:35:00 -06:00
Austin Burdine
9e93c2b6aa deps: bookshelf@0.10.0 (#7074)
merged in fix for lodash
2016-07-06 10:31:24 +01:00