{"id":16840075,"url":"https://github.com/senorprogrammer/til","last_synced_at":"2025-04-11T05:41:34.765Z","repository":{"id":57564960,"uuid":"257399854","full_name":"senorprogrammer/til","owner":"senorprogrammer","description":"🍊 A static site generator for capturing quick notes","archived":false,"fork":false,"pushed_at":"2021-12-27T19:10:07.000Z","size":6201,"stargazers_count":16,"open_issues_count":9,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T03:41:37.430Z","etag":null,"topics":["blog","go","golang","static-site-generator","terminal","til"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/senorprogrammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"senorprogrammer"}},"created_at":"2020-04-20T20:46:45.000Z","updated_at":"2023-08-06T06:26:00.000Z","dependencies_parsed_at":"2022-09-16T13:34:18.353Z","dependency_job_id":null,"html_url":"https://github.com/senorprogrammer/til","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senorprogrammer%2Ftil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senorprogrammer%2Ftil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senorprogrammer%2Ftil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senorprogrammer%2Ftil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senorprogrammer","download_url":"https://codeload.github.com/senorprogrammer/til/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351255,"owners_count":21089268,"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":["blog","go","golang","static-site-generator","terminal","til"],"created_at":"2024-10-13T12:35:23.577Z","updated_at":"2025-04-11T05:41:34.711Z","avatar_url":"https://github.com/senorprogrammer.png","language":"Go","funding_links":["https://github.com/sponsors/senorprogrammer"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"images/till_header.png\" width=\"916\" height=\"306\" alt=\"til\" title=\"til: jot it down\" /\u003e\u003c/p\u003e\n\n`til` is a fast, simple, command line-driven, mini-static site generator for quickly capturing and publishing one-off notes. \n\nAll in only two commands.\n\nExample output: [https://github.com/senorprogrammer/tilde](https://github.com/senorprogrammer/tilde)\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/senorprogrammer/til)](https://goreportcard.com/report/github.com/senorprogrammer/til)\n\n# tl;dr\n\n```bash\n❯ til New title here\n  ...edit\n❯ til -save\n```\n\nAnd you're done.\n\n# Contents\n\n* [Installation](#installation)\n\t* [From source](#from-source)\n\t* [As a binary](#as-a-binary)\n* [Configuration](#configuration)\n    * [Example](#config-example)\n* [Usage](#usage)\n    * [Creating a new page](#creating-a-new-page)\n    * [Building static pages](#building-static-pages)\n    * [Building, saving, committing, and pushing](#building-saving-committing-and-pushing)\n* [Publishing to GitHub Pages](#publishing-to-github-pages)\n* [Live Example](#live-example)\n* [Frequently Unasked Questions](#frequently-unasked-questions)\n\n## Installation\n\n### From source\n\n```\ngo get -u github.com/senorprogrammer/til\ncd $GOPATH/src/github.com/senorprogrammer/til\ngo install .\nwhich til\ntil --help\n```\n\n### As a Binary\n\n[Download the latest binary](https://github.com/senorprogrammer/til/releases) from GitHub.\n\ntil is a stand-alone binary. Once downloaded, copy it to a location you can run executables from (ie: `/usr/local/bin/`), and set the permissions accordingly:\n\n```bash\nchmod a+x /usr/local/bin/til\n```\n\nand you should be good to go.\n\n## Configuration\n\nWhen you first run `til --help` it will display the help and usage info. It also will also create a default configuration file. \n\nYou will need to make some changes to this configuration file.\n\nThe config file lives in `~/.config/til/config.yml` (if you're an XDG kind of person, it will be wherever you've set that to).\n\nOpen `~/.config/til/config.yml`, change the following entries, and save it:\n\n    * committerEmail\n    * committerName\n    * editor\n    * targetDirectories\n    \n`committerEmail` and `committerName` are the values `til` will use to commit changes with when you run `til -save`. \n\n`editor` is the text editor `til` will open your file in when you run `til [some title here]`.\n\n`targetDirectories` defines the locations that `til` will write your files to. If a specified target directory does not exist, `til` will try to create it. This is a map of key/value pairs, where the \"key\" defines the value to pass in using the `-target` flag, and the \"value\" is the path to the directory.\n\nIf only one target directory is defined in the configuration, the `-target` flag can be ommitted from all commands. \nIf multiple target diretories are defined in the configuration, all commands must include the `-target` flag specifying \nwhich target directory to operate against.\n\n### Config Example\n\n```\n---\ncommitMessage: \"build, save, push\"\ncommitterEmail: test@example.com\ncommitterName: \"TIL Autobot\"\neditor: \"mvim\"\ntargetDirectories: \n    a: ~/Documents/notes\n    b: ~/Documents/blog\n```\n\n## Usage\n\n`til` only has three usage options: `til`, `til -build`, and `til -save`.\n\n### Creating a new page\n\nWith one target directory defined in the configuration:\n\n```bash\n❯ til New title here\n2020-04-20T14-52-57-new-title-here.md\n```\n\nWith multiple target directories defined:\n\n```bash\n❯ til -target a New title here\n2020-04-20T14-52-57-new-title-here.md\n```\n\nThat new page will open in whichever editor you've defined in your config.\n\n### Building static pages\n\nWith one target directory defined in the configuration:\n\n```bash\n❯ til -build\n```\n\nWith multiple target directories defined:\n\n```bash\n❯ til -target a -build\n```\n\nBuilds the index and tag pages, and leaves them uncommitted.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"images/til_build.png\" width=\"600\" height=\"213\" alt=\"image of the build process\" title=\"til -build\" /\u003e\u003c/p\u003e\n\n### Building, saving, committing, and pushing\n\nWith one target directory defined in the configuration:\n\n```bash\n❯ til -save [optional commit message]\n```\n\nWith multiple target directories defined:\n\n```bash\n❯ til -target a -save [optional commit message]\n```\n\nBuilds the index and tag pages, commits everything to the git repo with the commit message you've defined in your config, and pushes it all up to the remote repo.\n\n`-save` makes a hard assumption that your target directory is under version control, controlled by `git`. It is recommended that you do this.\n\n`-save` also makes a soft assumption that your target directory has `remote` set to GitHub (but it should work with `remote` set to anywhere).\n\n`-save` takes an optional commit message. If that message is supplied, it will be used as the commit message. If that message is not supplied, the `commitMessage` value in the config file will be used. If that value is not supplied, an error will be raised.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"images/til_save.png\" width=\"600\" height=\"259\" alt=\"image of the save process\" title=\"til -save\" /\u003e\u003c/p\u003e\n\n## Publishing to GitHub Pages\n\nThe generated output of `til` is such that if your `git remote` is configured to use GitHub, it should be fully compatible with GitHub Pages.\n\nFollow the [GitHub Pages setup instructions](https://guides.github.com/features/pages/), using the `/docs` option for **Source**, and it should \"just work\".\n\n## Live Example\n\nAn example published site: [https://senorprogrammer.github.io/tilde/](https://senorprogrammer.github.io/tilde/). And the raw source: [github.com/senorprogrammer/tilde](https://github.com/senorprogrammer/tilde)\n\n## Frequently Unasked Questions\n\n### Isn't this just (insert your favourite not this thing here)?\n\nYep, probably. I'm sure you could also put something like this together with [Hugo](https://gohugo.io), or [Jekyll](https://jekyllrb.com), or bash scripts, or emacs and some lisp macros.... Cool, eh?\n\n### Does it have search?\n\nIt does not.\n\n### Does this work on Windows?\n\nGood question. No idea. Let me know?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenorprogrammer%2Ftil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenorprogrammer%2Ftil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenorprogrammer%2Ftil/lists"}