{"id":15092022,"url":"https://github.com/toh82/hbs-blog","last_synced_at":"2026-02-14T02:03:31.655Z","repository":{"id":57148486,"uuid":"87298178","full_name":"toh82/hbs-blog","owner":"toh82","description":"Handlebarsjs helper collection to create a blog","archived":false,"fork":false,"pushed_at":"2017-12-25T17:50:53.000Z","size":18,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-22T08:46:06.056Z","etag":null,"topics":["blog","frontmatter","handlebars-js","hbs-blog","static-site-generator"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/hbs-blog","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/toh82.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-05T10:44:02.000Z","updated_at":"2024-12-15T12:37:06.000Z","dependencies_parsed_at":"2022-08-31T23:50:21.489Z","dependency_job_id":null,"html_url":"https://github.com/toh82/hbs-blog","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/toh82/hbs-blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toh82%2Fhbs-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toh82%2Fhbs-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toh82%2Fhbs-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toh82%2Fhbs-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toh82","download_url":"https://codeload.github.com/toh82/hbs-blog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toh82%2Fhbs-blog/sbom","scorecard":{"id":891378,"data":{"date":"2025-08-11","repo":{"name":"github.com/toh82/hbs-blog","commit":"d7863ca4388fdb0e45e355b52b9816dc4cc1378b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 1/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T11:57:35.657Z","repository_id":57148486,"created_at":"2025-08-24T11:57:35.657Z","updated_at":"2025-08-24T11:57:35.657Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29431593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"online","status_checked_at":"2026-02-14T02:00:07.626Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blog","frontmatter","handlebars-js","hbs-blog","static-site-generator"],"created_at":"2024-09-25T11:00:45.225Z","updated_at":"2026-02-14T02:03:31.638Z","avatar_url":"https://github.com/toh82.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub issues](https://img.shields.io/github/issues/toh82/hbs-blog.svg?style=flat-square)](https://github.com/toh82/hbs-blog/issues)\n[![Code Climate](https://img.shields.io/codeclimate/github/kabisaict/flow.svg?style=flat-square)](https://codeclimate.com/github/toh82/hbs-blog)\n\n# hbs-blog\nHandlebarsjs helper to create a static blog\n\n## Install\n\nThe best way to install this module is by npm:  \n`npm install hbs-blog`  \n\n[hbs-blog on npm](https://www.npmjs.com/package/hbs-blog)\n\n## Handlebarsjs helper\n\n### Article list\n\nThe article list helper gives you the possibility to render a list from documents, within a given folder. Documents which should be listed needs a **FrontMatter** header.  \nThe helper reads and provides the following data:\n- index\n- headline\n- subline\n- author\n- date\n- dateCode\n- tags\n- lang\n- intro (read from a html with id `intro-text`)\n- link (this is the link to the document)\n- sticky (is used for position of the article within the article list)\n- previewImage\n\nIf the helper has parameter for **respect sticky** set to true it will put the articles, which have set the property `sticky: true` within Front-Matter data, to the beginning of the list. \n\n**Example**\n```\n    {{#articleList '[base folder like ./src/]' '[folder of blog posts like posts/]' [respect sticky:true|false]}}\n      \u003cdiv\u003e\n        {{headline}}\n        {{author}}\n        ...\n      \u003c/div\u003e\n    {{/articleList}}\n```\n\n### Sticky list (see Article list)\n\nThe sticky list is a wrapper for the article list, which gives back only sticky articles (articles which have `sticky: true` property within **Front-Matter** header).\n\n**Example**\n```\n    {{#stickyList '[base folder like ./src/]' '[folder of blog posts like posts/]'}}\n      \u003cdiv\u003e\n        {{headline}}\n        {{author}}\n        ...\n      \u003c/div\u003e\n    {{/stickyList}}\n```\n\n### Tag navigation\n\nThe tag navigation helper walks through all files given in defined folder and reads the `tags` property from **FrontMatter** to generate a list of all available tags.\n\n- title (title of the tag)\n\n**Example**\n```\n\u003ch3\u003eFilter blog posts by tags:\u003c/h3\u003e\n\u003cul class=\"tags\"\u003e\n    {{#tagNavigation blog.post.folder}}\n    \u003cli class=\"tags__item\"\u003e\u003ca href=\"#{{title}}\"\u003e{{title}}\u003c/a\u003e\u003c/li\u003e\n    {{/tagNavigation}}\n\u003c/ul\u003e\n```\n\n### Markdown\n\nThe Markdown helper uses **Remarkable** to format markdown code to html. Yet not settings are added and be aware that, if there is a newline at the beginning of you text, the output will be messed up. Therefore, start your first line directly after the helper placeholder.\n\n**Example**\n```\n{{#markdown}}#your markdown text{{/markdown}}\n```\n\n### Format tags\n\nThe **Format Tags** helper takes a comma separated list of tags and render them with the given html code.\n\n- tag (tagname)\n\n**Example**\n```\n\u003cul class=\"tags\"\u003e\n    {{#formatTags tags}}\n    \u003cli class=\"tags__item\"\u003e{{tag}}\u003c/li\u003e\n    {{/formatTags}}\n\u003c/ul\u003e\n```\n\n### Format time (uses moment.js)\n\nThe **Format time** helper transform a date into a user-friendly format. It uses the [moment.js library](https://momentjs.com/docs/).\n\nThe `date` and `format` parameters are documented respectively [here](https://momentjs.com/docs/#/parsing/string/) and [here](https://momentjs.com/docs/#/parsing/string-format/).\n\n**Example 1**\n```\n{{formatTime date format}}\n```\n\n**Example 2**\n```\n\u003ctime datetime=\"{{formatTime date \"YYYY-MM-DD\"}}\"\u003e{{formatTime date \"DD.MM.YYYY\"}}\u003c/time\u003e\n```\n\n## Document Data Module (uses FrontMatter)\n\nThe document data module extends the `data` object with useful information which you can directly use as **handlebarsjs variables**. The main purpose is to push the [**FrontMatter**](https://www.npmjs.com/package/front-matter) properties into the `data` object but it also has system properties.  \n\n**System properties:**\n- relativePath (provides the path to the file)\n\n### Reading FrontMatter data from a document\n\nIn order to read data from a document use `lib/read-document-data`. It takes the document content as string and, if wanted, the data property name, which should be returned. If you don't pass the property name it will return all **FrontMatter** attributes, which can be read from the document.\n\n### Gulp usage of document data\n\nTo read **FrontMatter** data from the document in the pipe, use `gulp/load-document-data`. It will read the data and pass it into the object `file.data` which can be accessed with handlebar placeholders. After processing with handlebars you should trigger `remove-document-data` what will remove the **FrontMatter** data from the output.\n\n**Example:**\n```\ngulp.task('hbs', function () {\n  return gulp.src('./src/**/*.html')\n    .pipe(loadDocumentData())\n    .pipe(handlebars(pageConfig, options))\n    .pipe(removeDocumentData())\n    .pipe(gulp.dest('web'))\n})    \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoh82%2Fhbs-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoh82%2Fhbs-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoh82%2Fhbs-blog/lists"}