Commit Diff


commit - afd2ff1fd346d4a87f74a89565fe97187bc32892
commit + 480bac28c16746a1c8d8fcee6274b4f69e46a533
blob - 754d158563c07fd93fbed2e573b2e328d623e445
blob + 89afdfa40f4223e82de560bc38f3e3ef6fc5af67
--- index.html
+++ index.html
@@ -61,5 +61,223 @@
     additional documentation, see
     <a href="https://gameoftrees.org/gotsys.conf.5.html">gotsys.conf(5)</a>.
     </p>
+    <div>
+    <details>
+    <summary>Remotely managing repositories</summary>
+    <div class="config">
+    <p>
+    One of <a href="https://gameoftrees.org/gotsysd.8.html">gotsysd(8)</a>'s
+    coolest features is it's ability to let you manage your repositories
+    directly from
+    <a href="https://gameoftrees.org/gotsys.conf.5.html">gotsys.conf(5)</a>.
+    For example, your server configuration will initially contain the following
+    snippet:
+    </p>
+    <pre>
+    repository gotsys {
+      permit rw flan_hacker
+    }
+    </pre>
+    <p>
+    This declares a repository named <em>gotsys</em> and allows
+    <em>flan_hacker</em> to read and write to it. That is, the
+    <em>flan_hacker</em> user is allowed to clone and send new changes to the
+    repository.
+    </p>
+    <p>
+    The <em>gotsys</em> repository is special, as it lets you manage your
+    repository space by committing changes to it. However, it is declared as
+    any other repository. For example, the following snippet creates three new
+    repositories:
+    </p>
+    <pre>
+    repository "public_repo_a" {
+      permit rw flan_hacker
+    }
+    repository "public_repo_b" {
+      permit rw flan_hacker
+      permit ro anonymous
+    }
+    repository "private_repo_c" {
+      permit rw flan_hacker
+    }
+    </pre>
+    <p>
+    Just like with the <em>gotsys</em> repository, we declare three new
+    repositories that can be read and written to by the <em>flan_hacker</em>.
+    Note that <em>public_repo_b</em> also allows the <em>anonymous</em> user to
+    clone the repository, but not to send new changes to it, as it is declared
+    with the <b>ro</b> mode (read-only). Repositories that are readable by the
+    <em>anonymous</em> user will include a clone url in the summary of the
+    repository when browsing it with a web browser.
+    </p>
+    <p>
+    Lastly, it is worth noting that there is currently no way to rename or
+    delete repositories via
+    <a href="https://gameoftrees.org/gotsys.conf.5.html">gotsys.conf(5)</a>.
+    However, you can simply remove any repository declaration from your
+    configuration and the repository will no longer be accesible.
+    </p>
+    </div>
+    </details>
+    <details>
+    <summary>Setting up a custom domain</summary>
+    <div class="config">
+    <p>
+    A good way to personalize your repository space is by assigning it a custom
+    domain. This can be done as follows:
+    </p>
+    <ol>
+    <li>
+    <p>
+    <a href="https://gothub.org/contact.html">Contact</a> an
+    administrator and let them know you'd like to use a custom domain. You
+    will receive a confirmation informing you that the domain has been
+    configured, as well as an IP address.
+    </p>
+    </li>
+    <li>
+    <p>
+    Create a DNS A-record using the registrar of your choice, and point it at
+    the provided IP address.
+    </p>
+    </li>
+    <li>
+    <p>
+    Lastly, configure a <b>web server</b> in your
+    <a href="https://gameoftrees.org/gotsys.conf.5.html">gotsys.conf(5)</a>
+    using your custom domain. For example, the following snippet configures
+    one for <a href="https://no.vmmbugs.net">no.vmmbugs.net</a>:
+    </p>
+    <pre>
+    web server no.vmmbugs.net {
+      site owner "Vmm Hacker"
+    }
+    </pre>
+    </li>
+    </ol>
+    </div>
+    </details>
+    <details>
+    <summary>Configuring authentication</summary>
+    <div class="config">
+    <p>
+    The Game of Trees Hub configures all web servers with authentication
+    enabled by default. This requires visitors to log in before accessing your
+    repositories or website. However, it is up to you to configure who is
+    allowed to authenticate and who isn't. If you want anyone to be able to
+    authenticate, you can use the <em>anonymous</em> user, a reserved user
+    which doesn't need to be declared with the <b>user</b> directive:
+    </p>
+    <pre>
+    web server no.vmmbugs.net {
+      site owner "Vmm Hacker"
+      permit anonymous
+    }
+    </pre>
+    <p>
+    This will present you with a login screen and instructions on how to
+    authenticate over ssh when visiting
+    <a href="https://no.vmmbugs.net">no.vmmbugs.net</a>.
+    </p>
+    <p>
+    If you want only specific users to be able to authenticate, you need to
+    declare them first with the <b>user</b> directive:
+    </p>
+    <pre>
+    user flan_hacker {
+      authorized key ssh-ed25519 &lt;base64-encoded key&gt; flan_hacker@gothub.org
+    }
+    web server no.vmmbugs.net {
+      site owner "Vmm Hacker"
+      permit flan_hacker
+    }
+    </pre>
+    <p>
+    Note that in this case you won't be presented with instructions on how to
+    authenticate, as it is expected from the permitted user to know how to do
+    so.
+    </p>
+    <p>
+    You can set <b>permit</b>/<b>deny</b> rules for all repositories on a web
+    server, like we did in the examples above, or per-repository using the
+    <b>repository</b> directive within the web server block.
+    </p>
+    <p>
+    As a nice bonus, enabling authentication gives your repositories and
+    website an added layer of protection against scraping bots.
+    </p>
+    </div>
+    </details>
+    <details>
+    <summary>Configuring the visibility of repositories</summary>
+    <div class="config">
+    <p>
+    When first configuring a web server, you may notice that no repositories
+    are shown in the repository index. This is because web servers on the Game
+    of Trees Hub are initially configured to hide all repositories, preventing
+    the accidental leakage of private repositories. You can use
+    repository-specific parameters to configure this behaviour.
+    </p>
+    <p>
+    Repository-specific parameters can be set by using the <b>repository</b>
+    directive inside a <b>web server</b> block. For example, the following
+    snippet configures all repositories to be hidden by default, and
+    selectively unhides two repositories.
+    </p>
+    <pre>
+    web server no.vmmbugs.net {
+      site owner "Vmm Hacker"
+      permit anonymous
+      hide repositories on
+      repository "public_repo_a" {
+        hide repository off
+      }
+      repository "public_repo_b" {
+        hide repository off
+      }
+    }
+    </pre>
+    <p>
+    If most of your repositories are public, you can spare yourself some
+    tipping by making all repositories visible by default, and hidding only the
+    private ones.
+    </p>
+    <pre>
+    web server no.vmmbugs.net {
+      site owner "Vmm Hacker"
+      permit anonymous
+      hide repositories off
+      repository "private_repo_c" {
+        hide repository on
+      }
+    }
+    </pre>
+    <p>
+    If you decide to do this, be careful not to leak any private repositories!
+    </p>
+    </div>
+    </details>
+    <details>
+    <summary>Validate your configuration</summary>
+    <div class="config">
+    <p>
+    Invalid configurations will be automatically rejected by the server when
+    sending changes to it. To avoid this, you can validate your configuration
+    before committing any changes with the following
+    <a href="https://gameoftrees.org/gotsys.1.html">gotsys(1)</a>
+    command:
+    </p>
+    <pre>
+    $ gotsys check -f /path/to/gotsys.conf
+    </pre>
+    <p>
+    This will report any errors in your configuration. Once there are no more
+    errors, the command will output <em>configuration OK</em>, at which point you
+    can safely send your changes to the server.
+    </p>
+    </div>
+    </details>
+    </div>
   </body>
 </html>
blob - c2d81116b2c7ee1ab8bf609f21d5c0122b7bb733
blob + 515b30d2a802e2a919a60967efd7345c22c80168
--- style.css
+++ style.css
@@ -55,6 +55,30 @@ ul {
 
 pre {
 	padding: 1.2em 0 0 0;
+	color: var(--color);
 	background: var(--background-color-alt);
 	border-left: 5px solid var(--accent);
 }
+
+summary {
+	color: var(--color);
+	border-radius: 5px;
+	padding: 10px 30px;
+}
+
+details {
+	border: 1px solid var(--color);
+	border-radius: 5px;
+	margin-bottom: 10px;
+}
+
+details:open {
+	summary {
+		color: var(--background-color);
+		background: var(--color);
+	}
+}
+
+.config {
+	padding: 0px 30px;
+}