summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..cd14d1c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,59 @@
+# g2h - Generate Hugo style markdown pages from your git repository history
+
+This program allows you to generate markdown files to have a static web based interface for navigating git repositores.
+Something like [cgit](https://git.zx2c4.com/cgit/) for static websites, like [stagit](https://codemadness.org/stagit.html), but emitting Markdown for use in [Hugo](https://gohugo.io)[^1].
+
+## Goals
+
+- Generate static pages for projects fitting for the size of a personal homepage.
+- Generate markdown that can easily be integrated with Hugo.
+- Make full tree state and individual files for every commit viewable and also downloadable.
+- Work for [me](https://c.onl).
+
+## Non-goals
+
+- Provide codesearch.
+- Replacement for Git forges.
+- Replace cgit.
+- Work for large projects, as they may be found in a company (like) setting.
+- Implement any work that should be taken care of by Hugo, e.g. combining multiple projects onto a single page, feeds and custom styling.
+
+## Usage
+
+Let's assume your git project is in `~/development/project` and the sources for your static site are in `~/web/page`.
+Then you would run this command:
+```bash
+g2h --repo ~/development/project --out ~/web/page --title "My awesome project" --static-subdir static/project --content-subdir content/git/project
+```
+The markdown files for Hugo will be placed in `~/web/page/content/git/project` and static files, like tarballs for each commit and individual file hashes, into `~/web/page/static/project`.
+For a full list of options, their defaults and how they're changing the behavior of the program run `g2h --help`.
+
+## Features
+
+- [ ] Overview page.
+ Table of branches and table of tags.
+ Each with name, most recent message summary and last modified date.
+- [ ] Commit log page.
+ Table with branch/tag, message summary and last modified date columns.
+ - [ ] Tabbed log page.
+- [ ] Commit page.
+ Collection of metadata at the beginning of the page.
+ Consisting of commit hash, commit date, author, (redact email), parent(s) and child(ren).
+ Followed by the commit message and then a list of changed files.
+ - [ ] Show diffstat on commit page.
+- [ ] Tree view.
+ Show the state of the tree at the current commit.
+ Folders should be traversable by clicking and clicking on a file should open that file's page.
+- [ ] Individual file page.
+ File content in a codeblock with file extension based language detection.
+ For binary files a note that it can't be displayed.
+ - [ ] Don't treat pictures as binary files.
+ - [ ] Breadcrumbs for navigating.
+- [ ] Nav bar for navigating the pages mentioned above.
+ - [ ] Link to special readme, if a readme can be found, rendering markdown.
+- [ ] Wrapper script that takes care fo `venv` setup.
+- [ ] Limit to certain branch(es).
+- [ ] Limit commit range.
+- [ ] Parallelize generating output.
+
+[^1]: I'm using Hugo but any static site generator with a similar layout should work.