diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/app/frontend.php b/app/frontend.php index 24bebf7..111a65b 100644 --- a/app/frontend.php +++ b/app/frontend.php @@ -23,10 +23,12 @@ function get_header($title = null, $description = null) { if($title == null) { $title = $config['blog_name']; + } else { + $title = $title . ' ' . $config['title_seperator'] . ' ' . $config['blog_name']; } if($description == null) { - $title = $config['blog_description']; + $description = $config['blog_description']; } require 'themes/' . $config['frontend_theme'] . '/header.php'; diff --git a/app/generate.php b/app/generate.php index b416892..f0a0c48 100644 --- a/app/generate.php +++ b/app/generate.php @@ -26,9 +26,12 @@ function generate_rss($posts) { foreach($posts as $p){ $item = new Suin\RSSWriter\Item(); + $url = $config['blog_url'] . '/' . $p->slug . '/'; + $item ->title($p->title) ->description($p->body) + ->url($url) ->appendTo($channel); } diff --git a/app/plugins.php b/app/plugins.php index 85a0f99..23a816c 100644 --- a/app/plugins.php +++ b/app/plugins.php @@ -1,6 +1,6 @@ 4, +// The direct URL to your blog without a trailing slash (eg. https://adgr.dev or https://adgr.dev/blog) +'blog_url' => 'https://nicholas.dev1.adgr.dev', + // The name of your blog 'blog_name' => 'Nicholas Demo', @@ -28,6 +31,9 @@ // Date format 'date_format' => 'jS F Y', +// Page title seperator +'title_seperator' => '|', + /* ============================================ Advanced Settings ============================================ */ diff --git a/index.php b/index.php index e7494ba..36ba52f 100644 --- a/index.php +++ b/index.php @@ -26,7 +26,7 @@ }); $router->map('GET','/rss/', function() { - header('Content-type: application/json'); + header('Content-type: application/xml'); echo generate_rss(get_posts()); }); diff --git a/themes/default/assets/styles.css b/themes/default/assets/styles.css index f434fbd..419c73d 100644 --- a/themes/default/assets/styles.css +++ b/themes/default/assets/styles.css @@ -37,7 +37,7 @@ pre { } .site-header .logo { - background: #6a3093; /* fallback for old browsers */ + background: #6a3093; background: linear-gradient(to right, #6a3093, #a044ff); padding: 25px 0; text-transform: uppercase; @@ -104,24 +104,35 @@ hr { } table { - padding: 0; width: 100%; } - table tr { - border-top: 1px solid #cccccc; - background-color: white; - margin: 0; - padding: 0; } - table tr th { - font-weight: bold; - border: 1px solid #cccccc; - text-align: left; - margin: 0; - padding: 6px 13px; } - table tr td { - border: 1px solid #cccccc; - text-align: left; - margin: 0; - padding: 6px 13px; } - table tr th :first-child, table tr td :first-child { - margin-top: 0; } - table tr th :last-child, table tr td :last-child { - margin-bottom: 0; } \ No newline at end of file + padding: 0; width: 100%; +} + +table tr { + border-top: 1px solid #cccccc; + background-color: white; + margin: 0; + padding: 0; +} + +table tr th { + font-weight: bold; + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; +} + +table tr td { + border: 1px solid #cccccc; + text-align: left; + margin: 0; + padding: 6px 13px; +} + +table tr th :first-child, table tr td :first-child { + margin-top: 0; +} + +table tr th :last-child, table tr td :last-child { + margin-bottom: 0; +} \ No newline at end of file diff --git a/themes/default/single.php b/themes/default/single.php index 8591a3b..57d3465 100644 --- a/themes/default/single.php +++ b/themes/default/single.php @@ -1,4 +1,4 @@ - +title, $post->excerpt); ?>
<?= $post->title; ?> diff --git a/themes/default/tag.php b/themes/default/tag.php index 8ac6b54..89afd94 100644 --- a/themes/default/tag.php +++ b/themes/default/tag.php @@ -1,4 +1,7 @@ - +

Posts tagged ""

diff --git a/views/default.php b/views/default.php index e96a8d1..45fc047 100644 --- a/views/default.php +++ b/views/default.php @@ -1,7 +1,7 @@ - <?= BLOG_NAME ?> + <?= $config['blog_name']; ?>