summaryrefslogtreecommitdiff
path: root/src/web/config
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/web/config.php42
-rw-r--r--src/web/config/routes.php7
-rw-r--r--src/web/config/style.php9
3 files changed, 42 insertions, 16 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',
+ ),
+));
diff --git a/src/web/config/routes.php b/src/web/config/routes.php
deleted file mode 100644
index 1fc3b67..0000000
--- a/src/web/config/routes.php
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php /* Copyright (c) 2024 Freya Murphy */
-$routes = array();
-$routes[''] = 'home';
-$routes['robots.txt'] = '_meta/robots';
-$routes['sitemap.xml'] = '_meta/sitemap';
-$routes['manifest.json'] = '_meta/manifest';
-$routes['rss.xml'] = 'blog/rss';
diff --git a/src/web/config/style.php b/src/web/config/style.php
deleted file mode 100644
index 33a0f8b..0000000
--- a/src/web/config/style.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php /* Copyright (c) 2024 Freya Murphy */
-$style = array();
-$style['home'] = 'css/home.css';
-$style['blog'] = ['css/blog.css', 'css/prism.css'];
-$style['error'] = 'css/error.css';
-$style['prism'] = 'css/prism.css';
-
-$js = array();
-$js['blog'] = 'js/prism.js';