{"id":13557666,"url":"https://github.com/afreeorange/bock","last_synced_at":"2025-04-03T12:30:55.684Z","repository":{"id":5639830,"uuid":"53624605","full_name":"afreeorange/bock","owner":"afreeorange","description":"A small Markdown-based personal wiki in Go 🍺","archived":false,"fork":false,"pushed_at":"2025-01-31T19:58:13.000Z","size":12523,"stargazers_count":21,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T20:39:42.184Z","etag":null,"topics":["git","go","golang","markdown","wiki"],"latest_commit_sha":null,"homepage":"http://wiki.nikhil.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afreeorange.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-03-10T23:24:45.000Z","updated_at":"2025-01-31T19:58:17.000Z","dependencies_parsed_at":"2024-01-14T17:06:15.891Z","dependency_job_id":"3f0977cc-2365-4968-afb7-6bb87eeabae4","html_url":"https://github.com/afreeorange/bock","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afreeorange%2Fbock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afreeorange%2Fbock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afreeorange%2Fbock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afreeorange%2Fbock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afreeorange","download_url":"https://codeload.github.com/afreeorange/bock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247002169,"owners_count":20867415,"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":["git","go","golang","markdown","wiki"],"created_at":"2024-08-01T12:04:28.735Z","updated_at":"2025-04-03T12:30:55.675Z","avatar_url":"https://github.com/afreeorange.png","language":"Go","funding_links":[],"categories":["Python","golang"],"sub_categories":[],"readme":"# bock 🍺\n\nA small personal Markdown and `git`-powered wiki I wrote to teach myself Go. [You can see it in action here](https://wiki.nikhil.io/).\n\nI have old [Node](https://github.com/afreeorange/bock/tree/node) and [Python](https://github.com/afreeorange/bock/tree/python) versions of this as well for giggles.\n\n## Usage\n\nSee [the releases page](https://github.com/afreeorange/bock/releases) for a few pre-built binaries.\n\nHere's how you can run from source:\n\n```bash\n# Clone repo\ngit clone https://github.com/afreeorange/bock.git\n\n# Now point it at a git repository full of Markdown files\n# and tell it where to generate the output. You need to use\n# absolute paths for now.\ngo run --tags \"fts5\" . --in=/path/to/repo --out=/path/to/output --without-revisions\n\n# If your article repository is managed by git, you can omit\n# that last flag to generate ✨article revisions✨\ngo run --tags \"fts5\" . --in=/path/to/repo --out=/path/to/output\n```\n\nAdd a `--help` flag to see some more options.\n\n## Terminology and Setup\n\nAn **Entity** is either\n\n- An **Article**, a Markdown file ending in `.md` somewhere in your article repository, or\n- A **Folder**, which is exactly what you think it is. You can organize your articles into folders at any depth.\n- A **Revision**, which is a `git` commit that modifies an Article.\n\nOther stuff:\n\n- The name of the Markdown file is the _title_ of the article and will be served at a simplified URI with underscores. For example,\n  - `/Notes on Deleuze.md` will be served at `/Notes_on_Deleuze`\n  - `/Tech Stuff/OpenBSD/pf Notes.md` will be served at `/Tech_Stuff/OpenBSD/pf_Notes`\n- The root of the generated wiki will always redirect to `/Home` (for now) so you will need a `Home.md`.\n  - You'll be warned if you don't have one.\n  - It will be generated if you don't have one.\n- The paths `raw`, `revisions`, `random`, and `archive` are reserved. So, for example, don't create a `raw.md` anywhere. It will be overwritten.\n- You can place static assets in `__assets` in your article repository. You can reference all assets in there in your Markdown files prefixed with `/assets` (e.g. `__assets/some-file.jpg` \u0026rarr; `/assets/some-file.jpg`). [Here's an example](https://wiki.nikhil.io/Types_of_Documentation/raw/).\n- Any dotfiles or dotfolders are ignored when generating the entity-tree.\n  - This includes `node_modules`. See [this file](https://github.com/afreeorange/bock/blob/master/constants.go) for other things. It's a small list.\n\nThat's really about it.\n\n## What It Does\n\nThe first command in the \"Usage\" section will generate the following (using [this article](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time) as an example):\n\n* Every Markdown article in your repository rendered as [HTML](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/), [Raw Markdown](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/raw/), and [JSON](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/index.json)\n* A [listing of all revisions](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/revisions) for each article, if applicable. Some articles can be untracked and they will be annotated as such.\n* Each article's revision rendered as [HTML](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/revisions/04c7d651/) and [Raw Markdown](https://wiki.nikhil.io/CNN-IBNs_List_of_the_100_Greatest_Indian_Films_of_All_Time/revisions/04c7d651/raw) (Unless you set `-R=false`. Things will go _much_ faster too!)\n* Each folder's structure in [HTML](https://wiki.nikhil.io/Food/) and [JSON](https://wiki.nikhil.io/Food/index.json)\n* [An archive page](https://wiki.nikhil.io/archive/) that lets you search your articles thanks to SQLite and [SQL.js](https://github.com/sql-js/sql.js/)\n* A Homepage (if it doesn't exist as `Home.md`) at [`/Home`](https://wiki.nikhil.io/Home/)\n* A page that redirects to some random article at [`/random`](https://wiki.nikhil.io/random/)\n* An index page that redirects to `/Home`\n* A 404 Page at [`/404.html`](https://wiki.nikhil.io/404.html)\n\nA giant work in progress but works pretty well for me so far. Uses a baby implementation of Go's [WaitGroups](https://gobyexample.com/waitgroups) so will be slow on older machines or those with less memory.\n\n## Upcoming Features\n\n- [ ] Recently added articles\n- [ ] Recently updated articles\n- [ ] Articles that have not been checked in! \"Warning you have x untracked articles....\"\n- [ ] Revision Search in DB\n- [ ] Categories/Tags\n- [ ] Frontmatter support\n- [ ] Local development server with live-reloading\n- [ ] Customizable Templates with config JSON/YAML\n- [x] Option to disable revision histories\n- [ ] Better/finer concurrency control\n- [ ] [Table of Contents](https://github.com/abhinav/goldmark-toc)\n- [ ] [Treeviews in CSS](https://iamkate.com/code/tree-views/)\n- [x] MathJAX Support\n  - [ ] Self-hosted MathJAX\n- [ ] [Password-protected articles](https://github.com/robinmoisson/staticrypt)?\n- [ ] [SQLite Driver without CGO](https://gitlab.com/cznic/sqlite)? Appears to be slower but I don't care.\n\n---\n\n## Other Notes\n\n```golang\n\tgo func() {\n\t\tfor {\n\t\t\tlog.Printf(\"Number of goroutines: %d\", runtime.NumGoroutine())\n\t\t\ttime.Sleep(1 * time.Second)\n\t\t}\n\t}()\n```\n\n- [GoReleaser](https://goreleaser.com/quick-start/) and [Image](https://circleci.com/developer/orbs/orb/hubci/goreleaser) for CircleCI\n- [Stricter formatting](https://github.com/mvdan/gofumpt)\n- [Lovely stuff for CLIs](https://charm.sh/)\n- [You Don't Need a Library for File Walking in Go](https://engineering.kablamo.com.au/posts/2021/quick-comparison-between-go-file-walk-implementations/)\n- [gojekyll](https://github.com/osteele/gojekyll)\n- [gostatic](https://github.com/piranha/gostatic)\n- [A Guide to Build awesome CLIs](https://clig.dev/)\n- [Script](https://github.com/bitfield/script), a lovely little script-y library for Golang!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafreeorange%2Fbock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafreeorange%2Fbock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafreeorange%2Fbock/lists"}