{"id":13788396,"url":"https://github.com/irrealitas/hashlog","last_synced_at":"2025-05-12T02:33:16.504Z","repository":{"id":132665681,"uuid":"275350057","full_name":"irrealitas/hashlog","owner":"irrealitas","description":"Hashlog is a blog engine powered by Git and its commit messages.","archived":false,"fork":false,"pushed_at":"2020-07-21T07:52:58.000Z","size":1872,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-18T02:37:39.332Z","etag":null,"topics":["bash","blog","blog-engine","commit-message","css","git","html","static-site-generator"],"latest_commit_sha":null,"homepage":"https://irrealitas.github.io/hashlog/","language":"CSS","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/irrealitas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-27T10:36:19.000Z","updated_at":"2021-01-21T15:32:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"496fc1c6-44a1-48e2-b603-dfbfb5069c2f","html_url":"https://github.com/irrealitas/hashlog","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irrealitas%2Fhashlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irrealitas%2Fhashlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irrealitas%2Fhashlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irrealitas%2Fhashlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irrealitas","download_url":"https://codeload.github.com/irrealitas/hashlog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253662795,"owners_count":21944132,"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":["bash","blog","blog-engine","commit-message","css","git","html","static-site-generator"],"created_at":"2024-08-03T21:00:44.941Z","updated_at":"2025-05-12T02:33:16.491Z","avatar_url":"https://github.com/irrealitas.png","language":"CSS","funding_links":[],"categories":["Git Powered Blogs/Sites"],"sub_categories":[],"readme":"﻿# Hashlog\n\n*Hashlog* is a blog engine powered by Git and its commit messages.\n\nIt inverts the posting process. All the contents are in the Git commentaries (e.g. the commit message subject or body). It is based on the options of the `git log` command to display the commit messages in a web page.\n\nThis tool is the result of a [literary experiment](https://www.cyberpoetique.org/gitterature/) with paratext.\n\n## Use\n\n*Hashlog* uses:\n\n* [Bash](https://www.gnu.org/software/bash/)\n* [Git](https://git-scm.com)\n\nIt also uses these JavaScript libraries:\n\n* [CommonMark.js](https://github.com/commonmark/commonmark.js) to render the Markdown syntax of the commit messages\n* [Baffle](https://github.com/camwiegert/baffle) for the menu effect\n\n---\n\nYou can write the commit messages with Markdown and use the CommonMark's syntax, like `**bold**`, `*italic*` or `![image](src)`, that will be rendered by CommonMark.js parser.\n\nThe displayed posts are the commit messages which are tagged (with a specific tag defined in the variables of the file [hashlog.sh](hashlog.sh)).\n\nTo tag an old commit you can use the GitHub interface or the terminal command: `git tag -a TAGNAME.VESIONNUMBER ABBREVIATEDHASH` (e.g. `git tag -a log.2020.06.23 6bfcc13`). To discover the abbreviated commit hash (with the date and the subject of the commit) you can also use this command `git log --pretty=format'%h %cd %s'`.\n\nTo explore the tagging possibilities, there is the [Git tagging](https://git-scm.com/book/en/v2/Git-Basics-Tagging) page of the Git documentation.\n\n## Variables\n\nIn the file `hashlog.sh`, you have some Bash variables to manage this blog engine:\n\n* `MENULEFT`: the text that will be displayed in the left part of the menu (in bold).\n* `MENURIGHT`: the text that will be displayed in the right part of the menu (in italic); it is by default the command `cat content/surface.md` that displays the content of this file (in our example, we change the sentence in this file at each commit).\n* `TAGS`: the name of the tags that will be used to choose which commit messages to display (by default `log.*` for tags like `log.42` or `log.2020.06.23`)\n* `REPO`: the URL of the Git repository (useful for the posts links)\n\n## Modifications\n\nYou can also modify an old post by [rewriting Git history](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History).\n\nIf you want to modify the template and if you use Gulp, you can work with the files in the folder `src`. If you're not working with Gulp, you can work directly with the files in `dist`.\n\n## Deployment\n\nThe command `./hashlog.sh html` will render the blog with all its posts.\n\nThe `gulp` command will also render the blog and a live server.\n\nEverything can work locally, and you can copy the `dist` folder to a web server. It's also possible to clone this repository and work directly with the GitHub interface.\n\nYou can also work with GitLab pages with something like this in a `.gitlab-ci.yml` file:\n\n```\nimage: alpine:latest\n\npages:\n  script:\n  - apk update\n  - apk add git curl alpine-sdk autoconf automake bash build-base\n  - mkdir public\n  - cp -r dist/{css,fonts,img,js} public/\n  - ./hashlog.sh html\n  - cp -r dist/index.html public/index.html\n  artifacts:\n    paths:\n    - public\n  only:\n  - master\n```\n\n## Examples\n\nExamples of *hashlog*:\n\n* with [GitHub Pages](https://irrealitas.github.io/hashlog/)\n* [La Gittérature](https://antilivre.gitlab.io/gitterature/), a literary experiment for [Abrüpt](https://abrupt.ch/)\n\n## Influence\n\nThis tool was influenced by the ideas of [@loup-brun](https://github.com/loup-brun) and [@antoinentl](https://github.com/antoinentl) ([Pièce 01](https://scolaire.loupbrun.ca/piece01/) and [Cheminement textuel](https://www.quaternum.net/2019/12/09/cheminement-textuel/)). It enters into the concept of [Gittérature](https://framagit.org/gitterature/gitterature).\n\n## License\n\nMIT License - see [LICENSE](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firrealitas%2Fhashlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firrealitas%2Fhashlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firrealitas%2Fhashlog/lists"}