๐พ Archived View for source.community โบ Fuwn โบ space โบ blob โบ main โบ handler.go captured on 2023-07-10 at 13:32:57. Gemini links have been rewritten to link to archived content
โฌ ๏ธ Previous capture (2023-01-29)
โก๏ธ Next capture (2024-02-05)
-=-=-=-=-=-=-
. ,-. ,-. . . ,-. ,-. ,-. ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . . `-. | | | | | | |-' | | | | | | | | | | | | | | | | | `-' `-' `-^ ' `-' `-' :: `-' `-' ' ' ' ' ' ' `-^ ' ' ' `' `-| /| `-'
git clone https://source.community/Fuwn/space.git
View raw contents of /handler.go (main)
โโโโโฎ 1โ // Copyright (C) 2021-2021 Fuwn 2โ // SPDX-License-Identifier: GPL-3.0-only 3โ 4โ package main 5โ 6โ func handle() { 7โ routes() 8โ errors() 9โ meta() 10โ redirect() 11โ } 12โ 13โ func routes() { 14โ // TODO: Automate this 15โ createRoute("/", "default.gmi", "pages/index.gmi") 16โ createRoute("/skills", "default.gmi", "pages/skills.gmi") 17โ createRoute("/interests", "default.gmi", "pages/interests.gmi") 18โ createRoute("/contact", "default.gmi", "pages/contact.gmi") 19โ createRoute("/gemini", "default.gmi", "pages/gemini.gmi") 20โ createRoute("/gopher", "default.gmi", "pages/gopher.gmi") 21โ createRoute("/donate", "default.gmi", "pages/donate.gmi") 22โ 23โ // TODO: Iterate over content/pages/blog directory to automate blog routing 24โ createBlogRoute("/programming_languages", "pages/blog/programming_languages", "Programming Languages", false, noDateNoShow) 25โ createBlogHandler("/blog") 26โ } 27โ 28โ func errors() { 29โ createErrorRoute("/*", "error.gmi", "pages/error/404.gmi", "404") 30โ } 31โ 32โ func meta() { 33โ createFileRoute("/favicon.txt", "favicon.txt") 34โ createFileRoute("/favicon.ico", "favicon.ico") 35โ createFileRoute("/robots.txt", "robots.txt") 36โ } 37โ 38โ func redirect() { 39โ createRedirectRoute("/x/*", "/proxy", true) 40โ } โโโโโฏ
ยท ยท ยท
ยฉ 2023 source.community