{"id":15022952,"url":"https://github.com/photogabble/eleventy-plugin-blogtimes","last_synced_at":"2026-01-21T10:38:02.071Z","repository":{"id":65629495,"uuid":"595817917","full_name":"photogabble/eleventy-plugin-blogtimes","owner":"photogabble","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-31T22:24:58.000Z","size":125,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T15:51:20.721Z","etag":null,"topics":["11ty","11ty-plugin"],"latest_commit_sha":null,"homepage":"","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/photogabble.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGEOG.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":"2023-01-31T21:43:58.000Z","updated_at":"2023-06-05T15:22:00.000Z","dependencies_parsed_at":"2023-02-16T23:45:37.422Z","dependency_job_id":null,"html_url":"https://github.com/photogabble/eleventy-plugin-blogtimes","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/photogabble/eleventy-plugin-blogtimes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photogabble%2Feleventy-plugin-blogtimes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photogabble%2Feleventy-plugin-blogtimes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photogabble%2Feleventy-plugin-blogtimes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photogabble%2Feleventy-plugin-blogtimes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/photogabble","download_url":"https://codeload.github.com/photogabble/eleventy-plugin-blogtimes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/photogabble%2Feleventy-plugin-blogtimes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28631937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["11ty","11ty-plugin"],"created_at":"2024-09-24T19:58:34.367Z","updated_at":"2026-01-21T10:38:02.056Z","avatar_url":"https://github.com/photogabble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blogtimes Eleventy Plugin\n\nBlogtimes is a plugin for the [Eleventy](https://github.com/11ty/eleventy) static site generator, written in JavaScript.\nGiven a directory with a valid git repository it will generate a histogram of commit times over 24 hours defaulting to\nwithin the past 30 days.\n\nIt's a direct port from PHP of\nthe [WordPress plugin Blogtimes](https://photogabble.co.uk/noteworthy/blogtimes-a-trip-down-memory-lane/), which was\nitself ported to WordPress by Matt Mullenweg from b2 in 2003.\n\nHere is a screenshot of what its output looks like:\n![Blogtimes Histogram of git commit times, the x axis is in hours from 0 to 23, there are vertical lines to show minutes from midnight each git commit was made. The lines are shaded, the darker they are the more commits there were at that time](blogtimes.png)\n\n## Why?\n\nI have been building websites and blogging since 1999, starting with hand coded html in notepad, I quickly picked up b2\nand soon after WordPress. Around that time I was an avid subscriber to Matt's blog and so when they shared their port of\nBlogtimes for WordPress (I believe it was the second WordPress plugin,) I immediately gave it a go.\n\nFor a number of years, every so often I would remember that histogram but not where it came from. In 2019 I began\nresearching and in 2022 I finally published what I had found\nin [Blogtimes: A trip down memory lane](https://photogabble.co.uk/noteworthy/blogtimes-a-trip-down-memory-lane/). In\nJanuary of 2023 [Mike Little's post on Mastodon](https://notacult.social/@mikelittle@mastodon.online/109750328046847753)\nreminded me of this whole escapade and I decided to port the plugin to Eleventy.\n\n18 years ago Matt ported it to WordPress from Sanjay Sheth's b2 version, I have continued that tradition by porting it\nto JavaScript for use with Eleventy. Long may it continue to be used and toyed with - code is poetry.\n\nYou\ncan [browse the WordPress versions source over at their trac service](https://plugins.trac.wordpress.org/browser/blogtimes/)\n.\n\n## Install\n\n```\nnpm i @photogabble/eleventy-plugin-blogtimes\n```\n\n## Configuration\n\n```ts\ntype EleventyPluginBlogtimesOptions = {\n  width?: number, // Image Width, default: 480\n  height?: number, // Image Height, default: 80\n  title?: string, // Title output top left, default: 'Git Commits'\n  lastXDays?: number, // Time period in days, default: 30\n  hPadding?: number, // Padding top and bottom, default: 5\n  vPadding?: number, // Padding left and right, default: 5\n  showTicks?: boolean, // Show ticks, default: true\n  unitName?: string, // Units, displayed centered at bottom, default: 'hour of day'\n\n  outputFileExtension: string, // Image mimetype, default: 'png, must be either png or jpg\n  outputDir: string, // Image output directory, default: 'bt-images'\n  urlPath: string, // Image url path, default: 'bt-images'\n  hashLength?: number, // Image filename hash length, default: 10\n\n  generateHTML?: Function,\n}\n```\n\n## Usage\n\nIn your Eleventy config file (defaults to `.eleventy.js`):\n\n```js\nmodule.exports = (eleventyConfig) =\u003e {\n  eleventyConfig.addPlugin(require('@photogabble/eleventy-plugin-blogtimes'),{});\n};\n```\n\nYou will now be able to use the `blogtimes` shortcode in your templates:\n\n```nunjucks\n{% blogtimes %}\n```\n\nBy default, blogtimes will process the git stats for the repository its run in. You can change that by passing an absolute path to the shortcode.\n\n## Libraries in use\n\n- [node canvas](https://www.npmjs.com/package/canvas)\n- [bdf-canvas](https://www.npmjs.com/package/bdf-canvas)\n- [git-log-parser](https://www.npmjs.com/package/git-log-parser)\n\n## License\n\nThis 11ty plugin is open-sourced software licensed under the [MIT License](LICENSE). Also included in this repository\nare [classic X Window System bitmap fonts](https://www.cl.cam.ac.uk/~mgk25/ucs-fonts.html) which are considered to\nbe [public domain](https://creativecommons.org/publicdomain/mark/1.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotogabble%2Feleventy-plugin-blogtimes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphotogabble%2Feleventy-plugin-blogtimes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphotogabble%2Feleventy-plugin-blogtimes/lists"}