71 lines
3.7 KiB
HTML
71 lines
3.7 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<!-- t: // fill out the following information -->
|
|
<!-- t: set domain -->
|
|
<!-- t: set sitename unconfigured tomatenmharksite -->
|
|
<!-- t: set sitedecoration :) -->
|
|
<!-- t: set ownername CHANGEME -->
|
|
<!-- t: set ownerpage /info/me/ -->
|
|
|
|
<!-- t: // remove this to disable the "tomatenmharksite documentation" link -->
|
|
<!-- t: set docslink true -->
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="color-scheme" content="light dark">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>tomatenmharksite documentation</title>
|
|
</head>
|
|
<body>
|
|
<h2>tomatenmharksite documentation</h2>
|
|
<div>documentation of how the tomatenmharksite server works for people who care or people who keep forgetting (me)</div>
|
|
<div>go to <a href="/">index without</a> or <a href="/dbg">with debugging information</a></div>
|
|
|
|
<h3>index</h3>
|
|
|
|
<h4>links</h4>
|
|
In the "running" section on the website, the ids may or may not be links.
|
|
If a <code>/srv/tomatenmhark-slashinfo/*/index.html</code> entry exists, the link will point to that info site,
|
|
If only a <code>/srv/tomatenmhark-redirect/*</code> entry exists, the link will follow that redirect,
|
|
and if neither exist, there will be no link.<br>
|
|
In the "everything else" section, every entry links to its info page, if there is one.
|
|
|
|
<h4>texts</h4>
|
|
Each id has a status text. This can be a file's content or dynamic output, and will be cached for 3 seconds.
|
|
If a status consists of multiple lines, the all but the first one are additional information. In this case,
|
|
the first line will be <em>emphasized</em> and the additional lines will be displayed on hover.
|
|
|
|
<h4>customizing</h4>
|
|
|
|
The contents of the index are specified in a template file, <code>index.html</code>.
|
|
This file is served as-is, but comments like <code><!-- t: ... --></code> are
|
|
given special meaning.
|
|
See <code>index.html</code> and <code>int.html</code> for usage examples.
|
|
|
|
<h3>files</h3>
|
|
|
|
<h4>/tmp/tomatenmhark-status-*</h4>
|
|
For each file <code>/tmp/tomatenmhark-status-*</code>, an entry will be created on <a href="/"><!-- t: safe domain --></a>.
|
|
This entry will have the id <code>*</code> and the file's contents will be shown after that.
|
|
|
|
<h4>/srv/tomatenmhark-dystatus/*</h4>
|
|
Each file in <code>/srv/tomatenmhark-dystatus/</code> acts like a <code>/tmp/tomatenmhark-status-*</code> file,
|
|
but instead of displaying its contents, the tomatenmharksite server will execute the file and display its output.
|
|
|
|
<h4>/srv/tomatenmhark-slashinfo/*</h4>
|
|
The files in <code>/srv/tomatenmhark-slashinfo/</code> are served under <a href="/info">/info</a>, and <code>index.html</code> will be served
|
|
when a directory is requested (<code>/</code> → <code>/index.html</code>, <code>/thing</code> → <code>/thing/index.html</code>).<br>
|
|
For all directories in <code>/srv/tomatenmhark-slashinfo/</code> which contain a <code>desc</code>
|
|
and are not already listed as "running", an entry is created in the "everything else" section.
|
|
|
|
<h4>/srv/tomatenmhark-redirect/*</h4>
|
|
Each file in <code>/srv/tomatenmhark-redirect/</code> contains a port number or a domain, leading/trailing whitespace characters are ignored.<br>
|
|
If the file contains a port number, <code>/filename/...</code> will be redirected to <code>samedomain:portnumber/...</code>.<br>
|
|
If the file contains anything else, <code>/filename/...</code> will be redirected to <code>filecontent/...</code>.<br>
|
|
In the port number case, <code>http</code> is used. Otherwise, the protocol must be included in the file.
|
|
<code>%DOMAIN%</code> will be replaced with <code><!-- t: safe domain --></code> or whatever domain was used in the request.
|
|
To redirect to port <code>8000</code> using <code>https</code>, use <code>https://%DOMAIN%:8000</code>
|
|
|
|
</body>
|
|
</html>
|