README.md (1355B)
1 # [davideisinger.com][1] 2 3 [1]: https://davideisinger.com 4 5 ## Publishing Dispatches 6 7 Enable the repository's Git hooks once per clone: 8 9 ```sh 10 git config core.hooksPath .githooks 11 ``` 12 13 Pushing to `origin`'s `main` checks newly added, non-draft Dispatches and existing 14 Dispatches changing from draft to published. Their `date` must be no more than 15 24 hours old. Edits or renames of already-published posts, draft posts, other 16 branches, and other remotes are unaffected. The check reads the committed content 17 being pushed and compares it with the remote's current commit. 18 19 Before publishing, update the date and commit it: 20 21 ```sh 22 bin/timestamp content/journal/dispatch-44-october-2026/index.md 23 git add content/journal/dispatch-44-october-2026/index.md 24 git commit -m "Set publication date" 25 git push origin main 26 ``` 27 28 Without a filename, `bin/timestamp` still prints the timestamp and copies it to 29 the clipboard. For intentional backdating, `git push --no-verify origin main` 30 bypasses local push hooks for that push. The hook must be installed in each clone; 31 it does not enforce dates on server-side merges or pushes from other clones. 32 33 Run `bin/check-dispatch-hook` to exercise the workflow with temporary local Git 34 repositories, without contacting the publishing remote. 35 36 --- 37 38 © [CC BY 4.0 License][2] 39 40 [2]: https://creativecommons.org/licenses/by/4.0/deed.en