Index

resty-gitweb / 8df3cdd

A git web interface for Lua/OpenResty (you're on it right now!)

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
315 Dec 2020 18:527890389Update copyright noticesJosh Stockin164G

Blob @ resty-gitweb / init.lua

text/plain1108 bytesdownload raw
1-- resty-gitweb@init.lua
2-- Preloads scripts and config for OpenResty workers
3
4-- Copyright (c) 2020 Joshua 'joshuas3' Stockin
5-- <https://git.joshstock.in/resty-gitweb>
6-- This software is licensed under the MIT License.
7
8local git = require "git/git_commands"
9
10local pages_blob = require "pages/blob"
11local pages_commit = require "pages/commit"
12local pages_download = require "pages/download"
13local pages_index = require "pages/index"
14local pages_log = require "pages/log"
15local pages_row = require "pages/raw"
16local pages_refs = require "pages/refs"
17local pages_tree = require "pages/tree"
18
19local builder = require "utils/builder"
20local nav = require "utils/nav"
21local parse_uri = require "utils/parse_uri"
22local tabulate = require "utils/tabulate"
23local utils = require "utils/utils"
24
25-- Load YAML configuration
26_lyaml = require "lyaml"
27
28-- TODO: Read config file location from nginx env settings
29local _yaml_config_file = io.open("/home/josh/repos/joshstock.in/resty-gitweb.yaml")
30yaml_config = _lyaml.load(_yaml_config_file:read("*a"))
31_yaml_config_file:close()
32