๐Ÿ’พ Archived View for source.community โ€บ Fuwn โ€บ space โ€บ blob โ€บ main โ€บ handler.go captured on 2022-03-01 at 15:44:19. Gemini links have been rewritten to link to archived content

View Raw

More Information

โžก๏ธ Next capture (2023-01-29)

-=-=-=-=-=-=-

                                                         .
,-. ,-. . . ,-. ,-. ,-.    ,-. ,-. ,-,-. ,-,-. . . ,-. . |- . .
`-. | | | | |   |   |-'    |   | | | | | | | | | | | | | |  | |
`-' `-' `-^ '   `-' `-' :: `-' `-' ' ' ' ' ' ' `-^ ' ' ' `' `-|
                                                             /|
                                                            `-'

Profile for Fuwn

Fuwn / space

git clone https://source.community/Fuwn/space.git

Branches

Log

Tree

/handler.go (main)

โ†‘ /

blob

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โ”‚ }
โ”€โ”€โ”€โ”€โ•ฏ

ยท ยท ยท

๐Ÿก Home

FAQs

Privacy Policy

Terms & Conditions

Official Gemlog

info@source.community

ยฉ 2022 source.community