summaryrefslogtreecommitdiff
path: root/src/web/config.php
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-10-20 16:49:11 -0400
committerFreya Murphy <freya@freyacat.org>2024-10-20 16:49:11 -0400
commitcec4fb7ede7fee7b5621c096f3d5a4863b7b484e (patch)
tree9f0af211e9b2f9035220d94d07cd8edf381f61c1 /src/web/config.php
parentupdate john (diff)
downloadwebsite-cec4fb7ede7fee7b5621c096f3d5a4863b7b484e.tar.gz
website-cec4fb7ede7fee7b5621c096f3d5a4863b7b484e.tar.bz2
website-cec4fb7ede7fee7b5621c096f3d5a4863b7b484e.zip
refactor config and add allowed_hosts
Diffstat (limited to 'src/web/config.php')
-rw-r--r--src/web/config.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/web/config.php b/src/web/config.php
new file mode 100644
index 0000000..8689b8e
--- /dev/null
+++ b/src/web/config.php
@@ -0,0 +1,42 @@
+<?php /* Copyright (c) 2024 Freya Murphy */
+
+// ENVIRONMENT
+//
+// devlopment - do not cache any assets
+// - use http host provided by user
+//
+// production - use generated timestamps for each file
+// - hard code http host to 'domain' lang string
+//
+define('ENVIRONMENT', 'devlopment');
+
+// CONFIG
+//
+// config values needed across the website
+
+define('CONFIG', array(
+ /* core config settings */
+ 'domain' => 'freya.cat',
+ 'allowed_hosts' => ['freya.cat', 'www.freya.cat'],
+ 'base_path' => '/',
+ 'theme_color' => '#181818',
+ 'git_url' => 'https://g.freya.cat/freya',
+ /* route overides */
+ 'routes' => array(
+ '' => 'home',
+ 'robots.txt' => '_meta/robots',
+ 'sitemap.xml' => '_meta/sitemap',
+ 'manifest.json' => '_meta/manifest',
+ 'rss.xml' => 'blog/rss',
+ ),
+ /* css to load on each route */
+ 'style' => array(
+ 'home' => 'css/home.css',
+ 'blog' => ['css/blog.css', 'css/prism.css'],
+ 'error' => 'css/error.css',
+ ),
+ /* js to load on each route */
+ 'js' => array(
+ 'blog' => 'js/prism.js',
+ ),
+));