Index

joshstock.in / 5814dba

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
9712 Dec 2020 21:058147f6bUpdate lua-gitwebJosh Stockin113G

Blob @ joshstock.in / lua-gitweb / utils / parse_uri.lua

text/plain380 bytesdownload raw
1-- parse_uri.lua
2-- URI parsing
3
4-- Copyright (c) 2020 Joshua 'joshuas3' Stockin
5-- <https://joshstock.in>
6
7local utils = require("utils/utils")
8
9local _M = function()
10 local uri = ngx.var.uri
11 local split = string.split(string.sub(uri,2),"/")
12
13 local parsed = {}
14 parsed.uri = uri
15 parsed.parts = split
16 parsed.repo = split[1]
17
18 return parsed
19end
20
21return _M
22