Commit Graph

135 Commits

Author SHA1 Message Date
Hannah Wolfe
6d5155015b Change autolinked URLs to output nice quotes
ref #4257

- This is a follow on from #4257 where I updated the codestyle.
- We were outputting escaped single quotes when double quotes would be much nicer.
- Changes the HTML output from our markdown conversion (non-breaking change)
- Updated tests to match the new output
2014-10-14 11:09:06 +02:00
Hannah Wolfe
00ef9cfcb1 Custom showdown extensions should be linted
ref #4243

- Removing /lib/ from the list of things which aren't linted, as this is
  all custom code
- Fixing up the two files to pass linting, erring on the side of caution
  with disabling regexp rules vs fixing regexes!
2014-10-12 15:28:19 +02:00
Hannah Wolfe
efea8dc502 Moving nanoscroller to be managed by bower 2014-10-05 22:08:36 +01:00
Hannah Wolfe
8841be8ec8 GhostGFM honours escaped tildes
fixes #2703

- adds an extra rule to remove the slash if a tilde is escaped as showdown
  won't do this.
2014-09-19 09:16:33 +01:00
Paul Adam Davis
9b94e71805 Static nanoscroller integration
References #1892

A static integration of https://github.com/jamesflorentino/nanoScrollerJS



This is WIP with the goal of getting feedback on and deciding how we should integrate this into Ghost.
2014-09-14 17:15:57 +01:00
Hannah Wolfe
b91dee35c4 Removing prototypal i18n code
refs #16, #17, #18, #19, #20, #21, #3801

- This code was a prototype system built when Ghost was still a prototype.
  It was never fully implemented and hasn't actually worked for ages.
- Now that the admin is in Ember, it's likely we'll need a very different
  system.
2014-08-16 17:29:54 +01:00
Harry Wolff
be37070fb6 This aims to speed up both the ghost application and tests by
migration from usage of config() to just an object of config.

no relevant issue

- Change 'loadConfig' task to 'ensureConfig' to more accurately reflect
what it is actually doing.  Its sole purpose is to make sure a `config.js`
 file exists, and as such the name now reflects that purpose.

- Update config/index.js to export the ghostConfig object directly
so that it can be accessed from other modules

- Update all references of config(). to config.
This was a blind global find all and replace, treat it as such.

- Fixes to tests to support new config access method

- Allow each test to still work when invoked invidually
2014-07-22 22:37:44 -04:00
David Arvelo
6658675646 Implement Mobile Editor
closes #2957
- add FastClick library to Gruntfile.js
- add touch-editor to client/assets/lib/
- add mobile-specific utils to util/mobile-utils.js
- add codemirror util to set up TouchEditor only if we're really on mobile
- change gh-codemirror from having a default action to a named action. prevents Ember.TextArea firing action on change
- change gh-codemirror `cm.getDoc().getValue()` to `cm.getValue()` for portability
- change codemirror-shortcuts ES6 export/import style
- changed ghostimagepreview.js to check for Ember.touchEditor in addition to Ghost.touchEditor
2014-06-24 18:33:43 -04:00
Hannah Wolfe
c02fd70c63 Improving the showdown extensions
fixes #2381

- renamed the ghost extensions
- added new html tests
2014-03-20 17:08:13 +00:00
Hannah Wolfe
d8f724d94d Removing typography extension
issue #2312

- The typography extension is still interfering in HTML blocks, reference style links and other bits and pieces it probably shouldn't be :(
- We'll add it back when it's ready.
2014-03-20 13:22:28 +00:00
Fabian Becker
cd74b0e232 Switch to bower for client assets.
fixes #2272
- Remove libraries from shared/vendor
- Remove libraries from client/assets/vendor
- Add bower to package.json and postinstall
- Add bower.json with dependencies
- Add scripts from bower_components to concat/uglify
- Fix tests
- Serve jquery from /ghost/built/theme/
2014-03-04 20:09:26 +00:00
Andy
b49f10c33d Add support for typographically-correct punctuation
Closes #1795
- Added typography.js Showdown extension
- Updated RSS test to support new typographic quotes
2014-02-28 09:44:08 +00:00
Hannah Wolfe
37b7907c09 Merge pull request #1858 from hswolff/improve-bootstrap-flow
Improve bootstrap flow of a Ghost application
2014-02-08 14:36:29 +00:00
Harry Wolff
f16dc290b7 Improve bootstrap flow of a Ghost application
addresses #1789, #1364

- Moves ./core/server/loader -> ./core/bootstrap.
The bootstrap file is only accessed once during startup,
and it’s sole job is to ensure a config.js file exists
(creating one if it doesn’t) and then validates
the contents of the config file.

Since this is directly related to the initializing 
the application is is appropriate to have 
it in the ./core folder, named bootstrap as that
is what it does.

This also improves the dependency graph, as now
the bootstrap file require’s the ./core/server/config
module and is responsible for passing in the validated
config file.

Whereas before we had ./core/server/config
require’ing ./core/server/loader and running its
init code and then passing that value back to itself,
the flow is now more straight forward of
./core/bootstrap handling initialization and then
instatiation of config module

- Merges ./core/server/config/paths into 
./core/server/config
This flow was always confusing me to that some config
options were on the config object, and some were on
the paths object.

This change now incorporates all of the variables
previously defined in config/paths directly
into the config module, and in extension,
the config.js file.

This means that you now have the option of deciding
at startup where the content directory for ghost
should reside.

- broke out loader tests in config_spec to bootstrap_spec

- updated all relevant files to now use config().paths

- moved urlFor and urlForPost function into 
 ./server/config/url.js
2014-02-07 17:34:21 -05:00
Hannah Wolfe
d165217aad Merge pull request #2063 from JohnONolan/robots
Introduce default robots.txt
2014-02-07 10:43:25 +00:00
Fabian Becker
bb4e48bf50 Removed mailto auto-linking.
fixes #1617
- Removed test
- Removed auto-linking from showdown gfm extension
2014-02-06 15:34:13 +00:00
John-David Dalton
6eab7b3f92 Replace underscore with lodash. 2014-02-06 14:08:34 +00:00
Hannah Wolfe
47c5e5aca4 Post settings published_at date improvements & fixes
closes #1866, fixes #2067, fixes #2068

- Upgrade client side moment to 2.4.0 to match the server side script.
- Add a guard to pub date to fix #2067
- Add new format to close #1866
2014-01-29 22:33:43 +00:00
John O'Nolan
0750c34f3f Introduce default robots.txt 2014-01-28 20:05:59 +07:00
Zach Schneider
a79597d8b3 Modified github.js to ensure __ isn't escaped at beginning of line
fixes #1791
2014-01-03 09:45:40 -05:00
Hannah Wolfe
38e781c8da jQuery link and min map 404 fixes
fixes #1652

- removes the min map thing which doesn't work properly #551, #766, #1479
2013-12-23 21:43:13 +00:00
Harry Wolff
b920662790 Create the config module, initially used
to standardise getting paths and absolute URLs.  Easy
to extend for other configurations we may need.
2013-11-25 16:35:16 -05:00
Fabian Becker
e210e75e97 Install in sub-directory support.
refs #527
2013-11-24 21:11:34 +00:00
jamesbloomer
b2ffc2e326 Allow newline when quotes are used at start of a sentence
closes #974
2013-11-21 13:56:43 +00:00
Zach Geis
1f15df41ef Avoid filtering markdown code blocks
closes #1045
- Fixed markdown code block format issue.
- Added test case to verify fix.
2013-10-26 12:16:47 -05:00
Hannah Wolfe
e86958fdb7 Further fix to image markdown
issue #866 again
2013-09-27 14:17:19 +01:00
Hannah Wolfe
e411ed6889 No autolinking inside of code blocks
closes #865

- rejigged markdown to have some functionality before showdown runs, and other functionality before.
- autolinking now happens last, so it can be smarter
2013-09-27 11:35:44 +01:00
Hannah Wolfe
8c6519fde7 Don't output image tag for empty source
closes #866

 - ensures we don't end up creating any more empty image tags.
2013-09-27 11:30:41 +01:00
John O'Nolan
a7a14fac22 New default user image 2013-09-18 22:34:01 +01:00
Hannah Wolfe
7193f05376 Default user image and cover
closes #812

- replace defaults with consistently named .png files
- change the settings saving code so that it doesn't double-save images and save the defaults to the db
2013-09-18 15:54:52 +01:00
Hannah Wolfe
16329ac6f0 Removing i18n until it's done properly 2013-09-17 02:41:40 +01:00
Hannah Wolfe
0021fb7a95 Save image uploads in the editor
closes #295

- Maintain a list of markers for CodeMirror which reference image codes
- Upload start triggers a selection
- Upload success replaces the selection
- No ref-style image markdown handling
- Showdown image URL handling improved at the expense of titles
- Tests updated
2013-09-16 18:08:49 +01:00
Hannah Wolfe
4c52428d7b Fixing path to jquery.min.map
closes #766
2013-09-16 10:09:00 +01:00
John O'Nolan
fe17e1f385 User profile refactor
Fixes #708
2013-09-15 22:42:30 +01:00
Sebastian Gierlinger
8f22737f04 Make settings() 'magic'
- access value directly by using ghost.settings('key')
- removed use of <key>.value
- removed workaround for activeTheme path
2013-09-15 19:52:37 +02:00
Sebastian Gierlinger
bd8db968ea Add setting filter
closes #172
- added type to ghost.settings()
- added /api/settings?type=<filter>
- added availableThemes to settingsCache
- removed cachedSettingsRequestHandler
- removed /api/themes (including front end)
- changed activePlugins to type "plugin" in default-settings.json
2013-09-15 18:04:01 +02:00
Hannah Wolfe
9fa659aeee Merge branch 'new-data-model' 2013-09-15 00:36:54 +01:00
John O'Nolan
19272a03cc New post title placeholder 2013-09-14 23:18:35 +01:00
Hannah Wolfe
70824a247f Merge branch 'migrations-003' into new-version
Conflicts:
	.gitignore
	config.example.js
	core/server/models/post.js
	package.json
2013-09-14 19:15:04 +01:00
Hannah Wolfe
147951c59c Reverting some markdown fixes
issue #644

- this caused more trouble than it was worth, will revisit
2013-09-12 21:49:29 +01:00
Matthew Harrison-Jones
a85e8e1efc Temporarily removed the Dashboard and all references
This also updates the CasperJS to match the new changes.
2013-09-11 15:38:09 +01:00
Hannah Wolfe
773fe0f3d9 Further improvements to markdown implementation
closes 644

- replaced showdown's implementation of bold and emphasis with a version close to marked's
- reverted the underscore-in-word handling to only deal with 2 or more underscores & commented the test this causes to fail - this was causing problems with double underscores.
2013-09-09 22:55:32 +01:00
John O'Nolan
1d2f6c96d3 New favicon 2013-09-09 20:14:34 +02:00
Sebastian Gierlinger
d9fb23496c Clean up config (non-env based settings)
closes #625
- removed defaultLang, forceI18n and activePlugins from config
- added values to default-settings.json
- updated to use values from settings
2013-09-06 18:46:50 +01:00
Hannah Wolfe
5bae29a0db Merge branch 'master' into migrations-003
Conflicts:
	core/server/data/migration/index.js
	core/server/models/post.js
2013-09-05 12:40:43 +01:00
Hannah Wolfe
c45f911a1e Improving underscore handling
Additional changes to how underscores are handled.
This more closely matches codemirror, but is still not 100%.
2013-09-04 15:20:26 +01:00
Hannah Wolfe
859e20d8a3 Merge pull request #590 from ErisDS/showdown-gfm-fix
GFM Auto-linking fixes
2013-09-02 10:58:34 -07:00
Hannah Wolfe
684150d36d GFM Auto-linking fixes
closes #577

- auto-linking was interfering with things that were already a link
- now checks to ensure we are not in a HTML or markdown link already
- added tonnes of new tests
2013-09-01 16:32:54 +01:00
Adam Howard
d90df55b75 Add post tagging functionality
closes #367
closes #368

- Adds Tag model with a many-to-many relationship with Post
- Adds Tag API to retrieve all previously used Tags (needed for suggestions)
- Allows setting and retrieval of Tags for a post through the Post's existing API endpoints.
- Hooks up the editor's tag suggestion box to the Ghost install's previously used tags
- Tidies the client code for adding tags, and encapsulates the functionality into a Backbone view
2013-08-30 16:20:22 +01:00
Hannah Wolfe
f318d164d4 Adding Github Flavored Markdown support
closes #422, issue #295

- Added GFM mode to codemirror
- Took the github.js extension for Showdown and added all useful behaviour
- Now supports strikethrough, line breaking and
  multiple underscores, and auto linking urls & emails without breaking
  definition urls
- Also added definition url handling in preparation for #295
- Added unit tests for the extentions individually and integrated with
  showdown
2013-08-29 14:32:09 +01:00