2017-04-04 19:07:35 +03:00
|
|
|
var coreHelpers = {},
|
|
|
|
register = require('./register'),
|
|
|
|
registerThemeHelper = register.registerThemeHelper,
|
|
|
|
registerAsyncThemeHelper = register.registerAsyncThemeHelper,
|
|
|
|
registerAllCoreHelpers;
|
2014-02-05 02:01:53 +04:00
|
|
|
|
2016-10-06 15:27:35 +03:00
|
|
|
coreHelpers.asset = require('./asset');
|
|
|
|
coreHelpers.author = require('./author');
|
2018-03-27 17:16:15 +03:00
|
|
|
coreHelpers.authors = require('./authors');
|
2016-10-06 15:27:35 +03:00
|
|
|
coreHelpers.body_class = require('./body_class');
|
2019-07-19 12:59:32 +03:00
|
|
|
coreHelpers.concat = require('./concat');
|
2016-10-06 15:27:35 +03:00
|
|
|
coreHelpers.content = require('./content');
|
|
|
|
coreHelpers.date = require('./date');
|
|
|
|
coreHelpers.encode = require('./encode');
|
|
|
|
coreHelpers.excerpt = require('./excerpt');
|
2016-05-17 16:06:12 +03:00
|
|
|
coreHelpers.facebook_url = require('./facebook_url');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.foreach = require('./foreach');
|
2015-06-27 18:42:10 +03:00
|
|
|
coreHelpers.get = require('./get');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.ghost_foot = require('./ghost_foot');
|
|
|
|
coreHelpers.ghost_head = require('./ghost_head');
|
2017-04-24 20:21:47 +03:00
|
|
|
coreHelpers.img_url = require('./img_url');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.is = require('./is');
|
|
|
|
coreHelpers.has = require('./has');
|
2018-01-09 16:50:57 +03:00
|
|
|
coreHelpers.lang = require('./lang');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.meta_description = require('./meta_description');
|
|
|
|
coreHelpers.meta_title = require('./meta_title');
|
2015-01-21 10:00:38 +03:00
|
|
|
coreHelpers.navigation = require('./navigation');
|
2017-02-09 22:21:27 +03:00
|
|
|
coreHelpers.page_url = require('./page_url');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.pagination = require('./pagination');
|
|
|
|
coreHelpers.plural = require('./plural');
|
|
|
|
coreHelpers.post_class = require('./post_class');
|
2015-05-13 12:26:49 +03:00
|
|
|
coreHelpers.prev_post = require('./prev_next');
|
|
|
|
coreHelpers.next_post = require('./prev_next');
|
2017-11-06 21:40:07 +03:00
|
|
|
coreHelpers.reading_time = require('./reading_time');
|
2018-01-09 16:50:57 +03:00
|
|
|
coreHelpers.t = require('./t');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.tags = require('./tags');
|
|
|
|
coreHelpers.title = require('./title');
|
2016-05-17 16:06:12 +03:00
|
|
|
coreHelpers.twitter_url = require('./twitter_url');
|
2014-10-10 18:54:07 +04:00
|
|
|
coreHelpers.url = require('./url');
|
2015-05-13 12:26:49 +03:00
|
|
|
|
2017-04-04 19:07:35 +03:00
|
|
|
registerAllCoreHelpers = function registerAllCoreHelpers() {
|
2013-12-02 03:31:55 +04:00
|
|
|
// Register theme helpers
|
2013-11-28 06:45:01 +04:00
|
|
|
registerThemeHelper('asset', coreHelpers.asset);
|
|
|
|
registerThemeHelper('author', coreHelpers.author);
|
2018-03-27 17:16:15 +03:00
|
|
|
registerThemeHelper('authors', coreHelpers.authors);
|
2015-12-17 17:39:43 +03:00
|
|
|
registerThemeHelper('body_class', coreHelpers.body_class);
|
2019-07-19 12:59:32 +03:00
|
|
|
registerThemeHelper('concat', coreHelpers.concat);
|
2013-11-28 06:45:01 +04:00
|
|
|
registerThemeHelper('content', coreHelpers.content);
|
|
|
|
registerThemeHelper('date', coreHelpers.date);
|
|
|
|
registerThemeHelper('encode', coreHelpers.encode);
|
|
|
|
registerThemeHelper('excerpt', coreHelpers.excerpt);
|
|
|
|
registerThemeHelper('foreach', coreHelpers.foreach);
|
2019-04-15 17:15:32 +03:00
|
|
|
registerThemeHelper('ghost_foot', coreHelpers.ghost_foot);
|
2015-12-17 17:39:43 +03:00
|
|
|
registerThemeHelper('has', coreHelpers.has);
|
2014-09-04 20:07:12 +04:00
|
|
|
registerThemeHelper('is', coreHelpers.is);
|
2017-04-24 20:21:47 +03:00
|
|
|
registerThemeHelper('img_url', coreHelpers.img_url);
|
2018-01-09 16:50:57 +03:00
|
|
|
registerThemeHelper('lang', coreHelpers.lang);
|
2015-12-17 17:39:43 +03:00
|
|
|
registerThemeHelper('meta_description', coreHelpers.meta_description);
|
|
|
|
registerThemeHelper('meta_title', coreHelpers.meta_title);
|
2015-01-21 10:00:38 +03:00
|
|
|
registerThemeHelper('navigation', coreHelpers.navigation);
|
2014-02-20 00:17:43 +04:00
|
|
|
registerThemeHelper('page_url', coreHelpers.page_url);
|
2013-12-02 03:31:55 +04:00
|
|
|
registerThemeHelper('pagination', coreHelpers.pagination);
|
2014-07-25 19:31:18 +04:00
|
|
|
registerThemeHelper('plural', coreHelpers.plural);
|
2015-12-17 17:39:43 +03:00
|
|
|
registerThemeHelper('post_class', coreHelpers.post_class);
|
2017-11-06 21:40:07 +03:00
|
|
|
registerThemeHelper('reading_time', coreHelpers.reading_time);
|
2018-01-09 16:50:57 +03:00
|
|
|
registerThemeHelper('t', coreHelpers.t);
|
2015-12-17 17:39:43 +03:00
|
|
|
registerThemeHelper('tags', coreHelpers.tags);
|
|
|
|
registerThemeHelper('title', coreHelpers.title);
|
2016-05-17 16:06:12 +03:00
|
|
|
registerThemeHelper('twitter_url', coreHelpers.twitter_url);
|
|
|
|
registerThemeHelper('facebook_url', coreHelpers.facebook_url);
|
2014-12-28 22:38:29 +03:00
|
|
|
registerThemeHelper('url', coreHelpers.url);
|
2014-07-25 19:31:18 +04:00
|
|
|
|
2014-10-10 18:54:07 +04:00
|
|
|
// Async theme helpers
|
2013-11-28 06:45:01 +04:00
|
|
|
registerAsyncThemeHelper('ghost_head', coreHelpers.ghost_head);
|
2015-03-21 15:14:51 +03:00
|
|
|
registerAsyncThemeHelper('next_post', coreHelpers.next_post);
|
|
|
|
registerAsyncThemeHelper('prev_post', coreHelpers.prev_post);
|
2015-06-27 18:42:10 +03:00
|
|
|
registerAsyncThemeHelper('get', coreHelpers.get);
|
2013-12-14 20:28:54 +04:00
|
|
|
};
|
2013-12-02 03:31:55 +04:00
|
|
|
|
2013-09-15 01:34:12 +04:00
|
|
|
module.exports = coreHelpers;
|
2017-04-04 19:07:35 +03:00
|
|
|
module.exports.loadCoreHelpers = registerAllCoreHelpers;
|