2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Go to file
Aileen Nowak 5c94151e14 Blog icon validations (#7893)
refs #7688

Adds an `uploads/icon/` endpoint to the api route to get a seperate entry point for blog icon validations. The blog icon validation will specifically check for images which have icon extensions (`.ico` & `.png`) and throw errors if:

- the icon file size is too big (>100kb)
- the icon is not a squaer
- the icon size is smaller than 32px
- the icon size is larger than 1000px
- the icon is not `.ico` or `.png` extension

TODOs for this PR:
- [X] get image dimensions
- [X] validate for image
	- [X] size
	- [X] form (must be square)
	- [X] type
	- [X] dimenstion (min 32px and max 1,000px)
- [X] return appropriate error messages
- [X] write tests

--------------------

TODOs for #7688:
- [X] Figure out, which favicon should be used (uploaded or default) -> #7713
- [ ] Serve and redirect the favicon for any browser requests, incl. redirects -> #7700 [WIP]
- [X] Upload favicon via `general/settings` and implement basic admin validations -> TryGhost/Ghost-Admin#397
- [X] Build server side validations -> this PR
2017-01-26 10:01:52 +01:00
.github Fix broken troubleshooting link in contributing.md (#7481) 2016-10-04 18:04:18 +01:00
content Upgrading Casper to 1.3.5 2017-01-17 15:49:03 +01:00
core Blog icon validations (#7893) 2017-01-26 10:01:52 +01:00
.editorconfig Various post-repo-split cleanup (#6910) 2016-07-12 11:55:46 -06:00
.gitignore 🎨 add logs folder to content folder (#7635) 2016-10-28 14:27:02 +01:00
.gitmodules Add Admin-Client as submodule at core/client 2016-05-19 14:20:18 +01:00
.jscsrc Various post-repo-split cleanup (#6910) 2016-07-12 11:55:46 -06:00
.jshintrc improvement: jshint/jscs 2016-06-17 22:59:47 +02:00
.npmignore add extraneous files to .npmignore 2016-11-07 09:14:14 -06:00
.travis.yml Update yarn.lock on greenkeeper PR's (#7885) 2017-01-24 23:33:10 +01:00
Gruntfile.js 🔥 😎 remove old migrations (#7887) 2017-01-25 13:47:49 +00:00
gulpfile.js 🎨 improve gulp dev reload behaviour (#7543) 2016-10-11 14:06:07 +02:00
index.js 🛠 knex-migrator 1.0.0 (#7873) 2017-01-23 12:32:17 +01:00
LICENSE 2017 (#7819) 2017-01-04 10:05:57 +00:00
MigratorConfig.js 🛠 knex-migrator 1.0.0 (#7873) 2017-01-23 12:32:17 +01:00
package.json Blog icon validations (#7893) 2017-01-26 10:01:52 +01:00
PRIVACY.md Switch to new native system font stack (#7219) 2016-08-18 20:29:46 +01:00
README.md 🔥 remove knex-migrator from README (#7884) 2017-01-24 18:30:22 +01:00
SECURITY.md Update SECURITY.md 2016-01-13 18:22:09 +02:00
yarn.lock Update knex-migrator to version 2.0.4 🚀 (#7902) 2017-01-26 00:46:59 +01:00

Ghost Build status

Warning: Major release in progress. Expect things to be broken in master.

The project is maintained by a non-profit organisation called the Ghost Foundation, along with an amazing group of independent contributors. We're trying to make publishing software that changes the shape of online journalism.

NOTE: If youre stuck, cant get something working or need some help, please head on over and join our Slack community rather than opening an issue.

 

Quick Start Install

First, youll need Node.js v4 LTS or a supported version.

  1. Download the latest release of Ghost
  2. Unzip, and fire up terminal
  3. npm install --production
  4. Start Ghost!
    • Local environment: npm start
    • On a server: npm start --production
  5. http://localhost:2368/ghost 🎉

More install docs here in case you get stuck.

 

Developer Install

This is for if you want to hack on Ghost core. First, youll need Node.js v4 LTS or a supported version. Then:

git clone git://github.com/tryghost/ghost.git
cd ghost

Install grunt

npm install -g grunt-cli

Install Ghost

npm install

Build the things!

grunt init

Start your engines

grunt dev

Congrats! You made it. BTW you can also just npm install ghost if you're into that sort of thing. NPM aficionados can also read up on using Ghost as an NPM module. More general install docs here in case you got stuck.

 

Deploying Ghost

Ghost(Pro)

The easiest way to deploy Ghost is with our official Ghost(Pro) managed service. You can have a fresh instance up and running in a couple of clicks with a worldwide CDN, backups, security and maintenance all done for you.

Not only will it save you many hours per month, but all revenue goes to the Ghost Foundation, which funds the maintenance and further development of Ghost itself. So youll be supporting open source software and getting a great service at the same time! Talk about win/win. 🏆

Other options are also available if you prefer playing around with servers by yourself, of course. The freedom of choice is in your hands.

 

Staying Up to Date

When a new version of Ghost comes out, you'll want to look over these upgrade instructions for what to do next.

You can talk to other Ghost users and developers in our public Slack team (it's pretty awesome). We have a public meeting every Tuesday at 5:30pm UK time.

New releases are announced on the dev blog. You can subscribe by email or follow @TryGhost_Dev on Twitter, if you prefer your updates bite-sized and facetious. 🎷🐢

 

Copyright & License

Copyright (c) 2013-2017 Ghost Foundation - Released under the MIT license.