GitRoot

craft your forge, build your project, grow your community freely
 1<!--
 2SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
 3
 4SPDX-License-Identifier: CC-BY-SA-4.0
 5-->
 6
 7# Customize web representation of your repository
 8
 9By 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.
10
11Withtout any modification to your repository, GitRoot will serve the files in your [default branch](../technicals/default_branch.md) of your git working directory. So if you go to `https://yourdomain.ourTld/.gitroot/users.yml` you will see the raw file.
12
13## Custom html
14
15That means, if you add a file named `index.html` at the root of your git working tree, GitRoot will serve it.
16
17To try it add `index.html` in any GitRoot repo:
18
19```html
20<!DOCTYPE html>
21<html>
22  <head>
23    <title>MyRepo</title>
24  </head>
25  <body>
26    <header>
27      <h1>My fabulous repo</h1>
28    </header>
29    <p>Yes it works 🚀</p>
30    <footer>
31      <small>Hosted with ❤️ by Gitroot</small>
32    </footer>
33  </body>
34</html>
35```
36
37Push it reload the page at `https://yourdomain.ourTld/`!
38
39## Style your repo
40
41But without css your repository looks clunky. Add a bit of css:
42
43```diff
44 <!DOCTYPE html>
45 <html>
46   <head>
47     <title>MyRepo</title>
48+    <link rel="stylesheet" href="/rootstyle.css">
49   </head>
50   <body>
51     <header>
52       <h1>My fabulous repo</h1>
53     </header>
54     <p>Yes it works 🚀</p>
55     <footer>
56       <small>Hosted with ❤️ by Gitroot</small>
57     </footer>
58   </body>
59 </html>
60```
61
62By default GitRoot comes with a `rootstyle.css` which is [simple.css](https://simplecss.org/).
63
64Want more personalization? Make a `custom.css` with your unique style and link it in your `index.html`.
65
66## Render more with apex
67
68But true power of GitRoot are there plugins. [Install](../how-tos/install_plugin.md), [activate](../how-tos/active_plugin.md) and [configure](../how-tos/plugin_rights.md) the apex plugin.
69
70It 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.
71
72> 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.