rahamatj / kaiju
A markdown powered portfolio/blog package for the Laravel framework.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:HTML
pkg:composer/rahamatj/kaiju
Requires
- erusev/parsedown: ^1.7
Requires (Dev)
- mockery/mockery: ^1.2
- orchestra/testbench: ^3.8
This package is auto-updated.
Last update: 2025-10-13 00:03:29 UTC
README
A markdown powered portfolio/blog package for the Laravel framework.
Features
- Powered by Laravel,
- Uses markdown files to create/update blogs/projects,
- Uses SQLite for database,
- Uses assets and compiled html/css from Indigo.
Set up
composer create-project --prefer-dist laravel/laravel blogcd blogcomposer require rahamatj/kaiju- Open the project on your browser and go to the path
/kaiju/installand follow along.
Or,
-
php artisan kaiju:install -
php artisan migrate -
php artisan kaiju:roar -
Set
block-installation-routeto true in thekaijuconfig file after the installation.
How to
- Set your name, bio, picture, socials and other information in
config/kaiju.php. - Place images inside
public/vendor/kaiju/assetsfolder and use image names with paths afterpublic/vendor/kaiju/assetsin your config file or markdown files. e.g.'picture' => 'images/profile.jpg'in your config file orin your markdown files.
Use full urls in case of external images.
- Place your blog posts and projects inside
kaiju/postsfolder. - Example
post.md
---
title: My title
description: My description
---
# Hello
- Example
project.md
---
title: My project
description: My description
is_project: true
---
# Hello
Projects are basically posts but has one extra field in the head section aptly named is_project and it needs to be set to true.
Make sure post and project titles are unique.
After adding new markdown files or updating old files run php artisan kaiju:roar or go to path /kaiju/roar to process new files or update existing posts.
- You can change the path to the markdown files in your
config/kaiju.phpfile if you need to.
// driver configurations
'file' => [
'path' => 'kaiju/posts'
]
-
Use full urls for socials and uncomment the ones you need.
-
If the
projectsis set to false it won't show up in the menu. -
aboutspecifies the file path from where the about page gets it's contents. -
Set
resumeaccording to your needs.
Extending
Add custom fields
- Publish kaiju migrations
php artisan vendor:publish --tag=kaiju-migrations, - Add new fields in the migration file.
- Create a new folder inside app called
Fieldsand add your new field classes here.
namespace App\Fields;
use Rahamatj\Kaiju\Field;
class Author extends Field
{
// override process method or keep the class empty
public function process($field, $value) {
return [
$field => $value // 'author' => $value
];
}
}
- Publish Kaiju Service Provider
php artisan vendor:publish --tag=kaiju-provider - Register new field classes inside
registerFields()method ofapp/Providers/KaijuServiceProvider.phpclass.
protected function registerFields()
{
return [
\App\Fields\Author::class
];
}
- Then in your
post.mdfile add a new field
title: My title
description: My description
author: John Doe
---
# Hello
If you don't create or register your field classes, any new fields added in your markdown file's head section will be added to the database as a json object stored under a field called extra. And you can access the field like $post->extra()->field
title: My title
description: My description
author: John Doe
kaiju: roar
---
# Hello
echo $post->extra()->kaiju; // roar
Override views
If you wish to override package views, place your views inside resources/views/vendor/kaiju folder. Follow the package's views folder structure.
For example, if you want to override the pagination view, simply create a new blade file called resources/views/vendor/kaiju/includes/pagination.blade.php and place your code there.