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 |
|
8 | local git = require "git/git_commands" |
9 |
|
10 | local pages_blob = require "pages/blob" |
11 | local pages_commit = require "pages/commit" |
12 | local pages_download = require "pages/download" |
13 | local pages_index = require "pages/index" |
14 | local pages_log = require "pages/log" |
15 | local pages_row = require "pages/raw" |
16 | local pages_refs = require "pages/refs" |
17 | local pages_tree = require "pages/tree" |
18 |
|
19 | local builder = require "utils/builder" |
20 | local nav = require "utils/nav" |
21 | local parse_uri = require "utils/parse_uri" |
22 | local tabulate = require "utils/tabulate" |
23 | local utils = require "utils/utils" |
24 |
|
25 | -- Load YAML configuration |
26 | _lyaml = require "lyaml" |
27 |
|
28 | -- TODO: Read config file location from nginx env settings |
29 | local _yaml_config_file = io.open("/home/josh/repos/joshstock.in/resty-gitweb.yaml") |
30 | yaml_config = _lyaml.load(_yaml_config_file:read("*a")) |
31 | _yaml_config_file:close() |
32 |
|