GitRoot

craft your forge, build your project, grow your community freely

Customize web representation of your repository

By default GitRoot show a page with instruction to clone your repository. But, i’m pretty sure you want to display lot of stuff to your future users.

Withtout any modification to your repository, GitRoot will serve the files in your default branch of your git working directory. So if you go to https://yourdomain.ourTld/.gitroot/users.yml you will see the raw file.

Custom html

That means, if you add a file named index.html at the root of your git working tree, GitRoot will serve it.

To try it add index.html in any GitRoot repo:

 1<!DOCTYPE html>
 2<html>
 3  <head>
 4    <title>MyRepo</title>
 5  </head>
 6  <body>
 7    <header>
 8      <h1>My fabulous repo</h1>
 9    </header>
10    <p>Yes it works 🚀</p>
11    <footer>
12      <small>Hosted with ❤️ by Gitroot</small>
13    </footer>
14  </body>
15</html>

Push it reload the page at https://yourdomain.ourTld/!

Style your repo

But without css your repository looks clunky. Add a bit of css:

 1 <!DOCTYPE html>
 2 <html>
 3   <head>
 4     <title>MyRepo</title>
 5+    <link rel="stylesheet" href="/rootstyle.css">
 6   </head>
 7   <body>
 8     <header>
 9       <h1>My fabulous repo</h1>
10     </header>
11     <p>Yes it works 🚀</p>
12     <footer>
13       <small>Hosted with ❤️ by Gitroot</small>
14     </footer>
15   </body>
16 </html>

By default GitRoot comes with a rootstyle.css which is simple.css.

Want more personalization? Make a custom.css with your unique style and link it in your index.html.

Render more with apex

But true power of GitRoot are there plugins. Install, activate and configure the apex plugin.

It will manage your layout, menu, transform all your markdown files into html and even generate a git worktree html representation. It will simplify the creation of your index.html by adding an index.md to your git working directory.

Today apex is the only one but I hoppe many plugins will emerge soon. Web is vast and can be very simple (like today in GitRoot) or very complexe (a SPA version of GitRoot where user can edit file directly in brower). All of that is possible in GitRoot and final user will be able to choose what he want.