Skip to content

Commit

Permalink
Upgrade Ghost to v1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chadly committed Oct 20, 2017
1 parent 53b0ce5 commit b9fce9c
Show file tree
Hide file tree
Showing 115 changed files with 8,453 additions and 8,209 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ var overrides = require('./core/server/overrides'),
//
// This also works for folders (although it isn't recursive), E.g.
//
// `grunt test:unit/server_helpers`
// `grunt test:unit/helpers`
//
// Unit tests are run with [mocha](http://mochajs.org/) using
// [should](https://github.com/visionmedia/should.js) to describe the tests in a highly readable style.
Expand Down
12 changes: 9 additions & 3 deletions content/themes/casper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,18 @@ One really neat trick is that you can also create custom one-off templates just

Casper styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need Node and Gulp installed globally. After that, from the theme's root directory:

`$ npm install`

`$ gulp`
```bash
$ npm install
$ gulp
```

Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.

The `zip` Gulp task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.

```bash
$ gulp zip
```

# PostCSS Features Used

Expand Down
8 changes: 4 additions & 4 deletions content/themes/casper/author.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} <span class="bull">&bull;</span>
</div>
{{#if website}}
<a class="social-link social-link-wb" href="{{website}}" target="_blank">{{> "icons/website"}}</a>
<a class="social-link social-link-wb" href="{{website}}" target="_blank" rel="noopener">{{> "icons/website"}}</a>
{{/if}}
{{#if twitter}}
<a class="social-link social-link-tw" href="{{twitter_url}}" target="_blank">{{> "icons/twitter"}}</a>
<a class="social-link social-link-tw" href="{{twitter_url}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
{{#if facebook}}
<a class="social-link social-link-fb" href="{{facebook_url}}" target="_blank">{{> "icons/facebook"}}</a>
<a class="social-link social-link-fb" href="{{facebook_url}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
<a class="social-link social-link-rss" href="http://cloud.feedly.com/#subscription/feed/{{url absolute="true"}}/rss/" target="_blank">{{> "icons/rss"}}</a>
<a class="social-link social-link-rss" href="http://cloud.feedly.com/#subscription/feed/{{url absolute="true"}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions content/themes/casper/default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{{!-- Styles'n'Scripts --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />

{{!-- This tag outputes SEO meta+structured data and other important settings --}}
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
{{ghost_head}}

</head>
Expand All @@ -31,9 +31,9 @@
<section class="copyright"><a href="{{@blog.url}}">{{@blog.title}}</a> &copy; {{date format="YYYY"}}</section>
<nav class="site-footer-nav">
<a href="{{@blog.url}}">Latest Posts</a>
{{#if @blog.facebook}}<a href="{{facebook_url @blog.facebook}}" target="_blank">Facebook</a>{{/if}}
{{#if @blog.twitter}}<a href="{{twitter_url @blog.twitter}}" target="_blank">Twitter</a>{{/if}}
<a href="https://ghost.org" target="_blank">Ghost</a>
{{#if @blog.facebook}}<a href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">Facebook</a>{{/if}}
{{#if @blog.twitter}}<a href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">Twitter</a>{{/if}}
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</nav>
</div>
</footer>
Expand Down
14 changes: 13 additions & 1 deletion content/themes/casper/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var livereload = require('gulp-livereload');
var nodemon = require('gulp-nodemon');
var postcss = require('gulp-postcss');
var sourcemaps = require('gulp-sourcemaps');
var zip = require('gulp-zip');

// postcss plugins
var autoprefixer = require('autoprefixer');
Expand Down Expand Up @@ -36,7 +37,8 @@ gulp.task('css', function () {
autoprefixer({browsers: ['last 2 versions']}),
cssnano()
];
gulp.src('assets/css/*.css')

return gulp.src('assets/css/*.css')
.on('error', swallowError)
.pipe(sourcemaps.init())
.pipe(postcss(processors))
Expand All @@ -49,6 +51,16 @@ gulp.task('watch', function () {
gulp.watch('assets/css/**', ['css']);
});

gulp.task('zip', ['css'], function() {
var targetDir = 'dist/';
var themeName = require('./package.json').name;
var filename = themeName + '.zip';

return gulp.src(['**', '!node_modules', '!node_modules/**'])
.pipe(zip(filename))
.pipe(gulp.dest(targetDir));
});

gulp.task('default', ['build'], function () {
gulp.start('watch');
});
3 changes: 2 additions & 1 deletion content/themes/casper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "casper",
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
"demo": "https://demo.ghost.io",
"version": "2.1.2",
"version": "2.1.4",
"engines": {
"ghost": ">=1.2.0"
},
Expand Down Expand Up @@ -43,6 +43,7 @@
"gulp-sourcemaps": "1.6.0",
"gulp-util": "3.0.7",
"gulp-watch": "4.3.8",
"gulp-zip": "4.0.0",
"postcss-color-function": "2.0.1",
"postcss-custom-properties": "5.0.1",
"postcss-easy-import": "1.0.1"
Expand Down
6 changes: 3 additions & 3 deletions content/themes/casper/partials/site-nav.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
<div class="site-nav-right">
<div class="social-links">
{{#if @blog.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank">{{> "icons/facebook"}}</a>
<a class="social-link social-link-fb" href="{{facebook_url @blog.facebook}}" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @blog.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank">{{> "icons/twitter"}}</a>
<a class="social-link social-link-tw" href="{{twitter_url @blog.twitter}}" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#if @labs.subscribers}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{else}}
<a class="rss-button" href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/" target="_blank">{{> "icons/rss"}}</a>
<a class="rss-button" href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/if}}
</div>
</nav>
Loading

0 comments on commit b9fce9c

Please sign in to comment.