From d99762305b6346c0ee531ad850c74386706f26cb Mon Sep 17 00:00:00 2001 From: grandeljay Date: Tue, 19 Dec 2023 15:26:39 +0100 Subject: [PATCH] docs(changelog): add keep a changelog note --- changelogs/changelog.md | 5 +++++ src/pages/changelog.php | 26 ++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 changelogs/changelog.md diff --git a/changelogs/changelog.md b/changelogs/changelog.md new file mode 100644 index 00000000..72ce638b --- /dev/null +++ b/changelogs/changelog.md @@ -0,0 +1,5 @@ +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/src/pages/changelog.php b/src/pages/changelog.php index 805aa5e7..06f3219e 100644 --- a/src/pages/changelog.php +++ b/src/pages/changelog.php @@ -12,25 +12,36 @@ $page = new Page(__FILE__, __('Changelog')); $page->header(); $page->bodyStart(); $page->navigation(); + +$parsedown = new \Parsedown(); +$changelogsDirectory = ROOT . '/changelogs'; +$changelogFilepath = $changelogsDirectory . '/changelog.md'; ?>

title ?>

+
+ text(\file_get_contents($changelogFilepath)); ?> +
+
@@ -56,9 +67,8 @@ $page->navigation();
$1', $text); + $text = \file_get_contents($filepath); + $text = \preg_replace('/(#(\d+))/', '$1', $text); ?>
text($text); ?>