add mdbook example
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
This example demonstrates generating a CSV spreadsheet from a few git
|
||||
repositories using Itsy-Gitsy.
|
||||
|
||||
Generate with:
|
||||
|
||||
$ itsy-gitsy -c csv.toml --clean --local
|
||||
|
||||
Then open "rendered/repos.csv" with a text editor or spreadsheet
|
||||
application.
|
||||
@@ -0,0 +1,11 @@
|
||||
This example renders a few git repositories as an mdBook with Itsy-Gitsy.
|
||||
|
||||
You'll need to have Itsy-Gitsy and mdbook available. Update the
|
||||
commands below to use absolute paths, if necessary.
|
||||
|
||||
Build the book with:
|
||||
|
||||
$ itsy-gitsy -c mdbook.toml --clean --local
|
||||
$ mdbook serve rendered/
|
||||
|
||||
And navigate to http://localhost:3000/ to view. That's it!
|
||||
@@ -0,0 +1,2 @@
|
||||
[book]
|
||||
title = "Itsy-Gitsy mdBook"
|
||||
@@ -0,0 +1,42 @@
|
||||
###############################################################################
|
||||
##
|
||||
## Minimal configuration to generate an "mdBook"
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
render_markdown = false
|
||||
syntax_highlight = false
|
||||
asset_files = ["book.toml"]
|
||||
|
||||
[gitsy_templates]
|
||||
path = "templates/"
|
||||
repo_list = "sidebar.html"
|
||||
repo_summary = "repo.html"
|
||||
history = "history.html"
|
||||
branches = "branches.html"
|
||||
tags = "tags.html"
|
||||
|
||||
[gitsy_outputs]
|
||||
path = "rendered/"
|
||||
repo_list = "src/SUMMARY.md"
|
||||
repo_summary = "src/%REPO%/about.md"
|
||||
history = "src/%REPO%/history.md"
|
||||
branches = "src/%REPO%/branches.md"
|
||||
tags = "src/%REPO%/tags.md"
|
||||
global_assets = ""
|
||||
cloned_repos = "cloned_repos/"
|
||||
|
||||
[connectr]
|
||||
path = "https://github.com/mrmekon/connectr"
|
||||
website = "https://github.com/mrmekon/connectr"
|
||||
description = "A super lightweight Spotify controller"
|
||||
|
||||
[tempest-cljs]
|
||||
path = "https://github.com/mrmekon/tempest-cljs"
|
||||
website = "https://github.com/mrmekon/tempest-cljs"
|
||||
description = "Tempest arcade game, in ClojureScript, hosted on Noir"
|
||||
|
||||
[picdb]
|
||||
path = "https://github.com/mrmekon/picdb"
|
||||
website = "https://github.com/mrmekon/picdb"
|
||||
description = "Command-line debugger for Microchip PIC processors"
|
||||
@@ -0,0 +1,7 @@
|
||||
# {{name}} -- Branches
|
||||
|
||||
| Branch | Hash | Summary |
|
||||
| --- | --- | --- |
|
||||
{% for entry in branches | sort(attribute="ts_utc") | reverse -%}
|
||||
| {{entry.ref_name}} | {{entry.short_hash}} | ({{entry.summary}}) |
|
||||
{% endfor -%}
|
||||
@@ -0,0 +1,7 @@
|
||||
# {{name}} -- Commits
|
||||
|
||||
| Hash | Summary |
|
||||
| --- | --- |
|
||||
{% for entry in history -%}
|
||||
| {{entry.short_hash}} | ({{entry.summary}}) |
|
||||
{% endfor -%}
|
||||
@@ -0,0 +1,11 @@
|
||||
# {{name}} -- Overview
|
||||
|
||||
{{metadata.description}}
|
||||
|
||||
## Recent commits (10 of {{history | length}})
|
||||
|
||||
{% for entry in history -%}
|
||||
{% if loop.index0 < 10 -%}
|
||||
- {{entry.short_hash}}: {{entry.summary}}
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
@@ -0,0 +1,10 @@
|
||||
# Summary
|
||||
|
||||
# Git Repositories
|
||||
|
||||
{% for repo in repos | sort(attribute="name") | reverse -%}
|
||||
- [{{repo.name}}]({{repo.name}}/about.md)
|
||||
- [history]({{repo.name}}/history.md)
|
||||
- [branches]({{repo.name}}/branches.md)
|
||||
- [tags]({{repo.name}}/tags.md)
|
||||
{% endfor -%}
|
||||
@@ -0,0 +1,7 @@
|
||||
# {{name}} -- Tags
|
||||
|
||||
| Tag | Hash | Summary |
|
||||
| --- | --- | --- |
|
||||
{% for entry in tags | sort(attribute="ts_utc") | reverse -%}
|
||||
| {{entry.ref_name}} | {{entry.short_hash}} | ({{entry.summary}}) |
|
||||
{% endfor -%}
|
||||
Reference in New Issue
Block a user