{"id":15654403,"url":"https://github.com/jaredly/hexo-renderer-handlebars","last_synced_at":"2025-04-30T23:33:56.703Z","repository":{"id":19226715,"uuid":"22461174","full_name":"jaredly/hexo-renderer-handlebars","owner":"jaredly","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-27T14:07:43.000Z","size":23,"stargazers_count":26,"open_issues_count":5,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-19T13:11:57.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaredly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-31T07:53:23.000Z","updated_at":"2023-02-19T13:18:30.000Z","dependencies_parsed_at":"2022-08-01T03:08:49.323Z","dependency_job_id":null,"html_url":"https://github.com/jaredly/hexo-renderer-handlebars","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fhexo-renderer-handlebars","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fhexo-renderer-handlebars/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fhexo-renderer-handlebars/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredly%2Fhexo-renderer-handlebars/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredly","download_url":"https://codeload.github.com/jaredly/hexo-renderer-handlebars/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251608400,"owners_count":21616852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:51:32.599Z","updated_at":"2025-04-30T23:33:56.676Z","avatar_url":"https://github.com/jaredly.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Handlebars](http://handlebarsjs.com) renderer plugin for [Hexo](http://zespia.tw/hexo)\n====================================\n\u003e With this plugin you can use the [handlebars](http://handlebarsjs.com/) to render your theme. For Hexo 3.x\n\n##Usage\n\n###Install\n\n``` bash\nnpm install hexo-renderer-handlebars --save\n```\n\n###Theme Development\n\n#### Helpers \u0026 Partials\n\nIf you use handlebars to develop themes, you may need to customize helpers. You can create a folder named `helper` in the theme root, then exports all helpers to an javascript object in `index.js`.  \n\nFor example:  \n\n```\n.\n├── languages\n└── layout\n\t└── partials\n\t\t└── footer.hbs\n└── helper\n\t└── index.js\n```\n\n`index.js`:\n\n``` javascript\nvar moment = require('moment');\n\nmodule.exports = function(hexo) {\n  return {\n\n    calendarDate: function(date) {\n      date = Date.parse(date.toString());\n      return moment(date).calendar();\n    },\n\n  };\n};\n```\n\nFor partials, put them in a `partials` function under the `layout`, and you will be able to use them normally.\n\n`footer.hbs`:\n\n``` handlebars\n\u003cdiv\u003e{{theme.author}} Something down here\u003c/div\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fhexo-renderer-handlebars","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredly%2Fhexo-renderer-handlebars","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredly%2Fhexo-renderer-handlebars/lists"}