Updated website to reflect new packaging and git.

Signed-off-by: sneedium <sneed@sneedmc.org>
This commit is contained in:
sneedium 2022-11-06 16:50:31 -05:00
parent 0544f64949
commit 8990aed644
Signed by: sneedium
GPG Key ID: 906F66490FBE722F
2 changed files with 9 additions and 7 deletions

View File

@ -10,10 +10,10 @@ static const char *INDEX_HTML =
"<p>WIP site for SneedMC, written in pure Mongoose.</p>\r\n"
"<p>Links:</p>\r\n"
"<li><a href='src'>Website Source</a></li>\r\n"
"<li><a href='gh'>SneedMC</a></li>\r\n"
"<li>asd</li>\r\n"
"<li></li>\r\n"
"<li></li>\r\n"
"<li><a href='git'>SneedMC Source</a></li>\r\n"
"<h2>Prebuilt Packages</h2>\r\n"
"<p>Prebuilt packages are available on <a href='https://packages.sneedmc.org/'>packages.sneedmc.org</a>.</p>\r\n"
"<p>For build and download instructions, see the <a href='https://git.sneedmc.org/Sneederix/sneedmc/src/branch/develop/BUILD.md'>git</a>.</p>\r\n"
"</body>\r\n"
"</html>\r\n";

8
main.c
View File

@ -68,9 +68,11 @@ static void ev_handler(struct mg_connection *nc, int ev, void *p, void *f) {
// allow for dynamic stuff in the future
mg_http_reply(nc, 200, "", INDEX_HTML, BASIC_STYLE);
} else if (eq(uri, "src", 4)) {
redir(nc, "https://github.com/Sneederix/sneedmc.org");
} else if (eq(uri, "gh", 3)) {
redir(nc, "https://github.com/Sneederix/SneedMC");
redir(nc, "https://git.sneedmc.org/Sneederix/sneedmc.org");
} else if (eq(uri, "git", 4)) {
redir(nc, "https://git.sneedmc.org/Sneederix/sneedmc");
} else if (eq(uri, "build", 6)) {
redir(nc, "https://git.sneedmc.org/Sneederix/sneedmc/src/branch/develop/BUILD.md");
} else {
struct mg_http_serve_opts opts = {.root_dir = "."}; // Serve local dir
mg_http_serve_dir(nc, p, &opts);