Add support for early access changelogs

This commit is contained in:
2023-03-27 19:31:06 +02:00
parent f5e2cbbc74
commit b7ef22b904
4 changed files with 718 additions and 521 deletions

View File

@@ -2,9 +2,22 @@
use Illuminate\Support\Facades\Route;
use App\Http\Redirection;
use League\CommonMark\CommonMarkConverter;
Route::get('/', fn () => view('homepage'));
Route::get('/early-access/release-notes', function () {
$path = public_path('builds/early-access/sponsors/changelog.md');
if (file_exists($path)) {
return view('changelog', [
'content' => (new CommonMarkConverter())
->convert(file_get_contents($path))
]);
} else {
abort(404);
}
});
collect([
Redirection::named('github', '/github', 'https://github.com/nicoverbruggen/phpmon'),
Redirection::named('releases', '/releases', 'https://github.com/nicoverbruggen/phpmon/releases'),