Branch

add a readme

Sat Sep 13 2025

Tucker McKnight <tucker.mcknight@gmail.com>


    

b0f62affcdbe79c5630797810401c5898b1069a9

Side-by-side
Stacked
README.md:0
Before
0
After
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
# What Is This?

Eleventy Repo Viewer is a plugin for [Eleventy](https://11ty.dev) that creates
plain, static HTML pages for displaying a git repository. You can read code,
browse commits, and clone the repository purely from plain old files on
a web server. It's sort of like a read-only version of GitHub, and requires no logic
on the backend whatsoever.

# Installation and Setup

## Prerequisites

1. git, which you probably already have
2. An 11ty website set up. You'll need to mmake a couple of additions to your eleventy config file.

## Installation & Setup

1. npm install this plugin
   This is not (yet) on npm. You can install it straight from this git repository, though.
   `npm install --save git+http://repos.tuckerm.us/repos/eleventy-repo-viewer.git#deploy/0.0.1-alpha.1`

2. Add this plugin to your eleventy config.

```diff-js
+import repoViewer from 'eleventy-repo-viewer'

export default (eleventyConfig) => {
  eleventyConfig.addPlugin(repoViewer, {
    repos: {
      "My Cool Project": {
        _type: "git",
        location: "/home/me/code/cool-project",
        defaultBranch: 'main',
        branchesToPull: ['main', 'develop'],
      },
    },
    path: "/repos",
    baseUrl: "https://example.com",
  })
}
```

3. Edit `reposConfig.ts` to describe the repositories that you want to show on your site.
See below for a more detailed description of the `reposConfig.ts` file.