Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->inGroup('general', function ($blueprint): void {
|
||||
$blueprint->add('site_name', config('app.name', 'LaraBlog'));
|
||||
$blueprint->add('site_url', config('app.url', 'http://localhost'));
|
||||
$blueprint->add('site_description', null);
|
||||
$blueprint->add('active_theme', 'default');
|
||||
$blueprint->add('attachments_url_prefix', env('ATTACHMENTS_URL_PREFIX', 'attachments'));
|
||||
});
|
||||
|
||||
$this->migrator->inGroup('seo', function ($blueprint): void {
|
||||
$blueprint->add('meta_title_suffix', null);
|
||||
$blueprint->add('default_description', null);
|
||||
$blueprint->add('default_keywords', null);
|
||||
$blueprint->add('json_ld_enabled', true);
|
||||
});
|
||||
|
||||
$this->migrator->inGroup('ai', function ($blueprint): void {
|
||||
$blueprint->add('provider', env('AI_PROVIDER', 'stub'));
|
||||
$blueprint->add('api_base_url', env('AI_API_BASE_URL'));
|
||||
$blueprint->add('api_key', env('AI_API_KEY'));
|
||||
$blueprint->add('model', env('AI_MODEL', 'gpt-4o-mini'));
|
||||
$blueprint->add('comment_moderation_enabled', true);
|
||||
$blueprint->add('content_optimization_enabled', true);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (! $this->migrator->exists('general.attachments_url_prefix')) {
|
||||
$this->migrator->inGroup('general', function ($blueprint): void {
|
||||
$blueprint->add('attachments_url_prefix', env('ATTACHMENTS_URL_PREFIX', 'attachments'));
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if ($this->migrator->exists('general.trackback_enabled')) {
|
||||
$this->migrator->delete('general.trackback_enabled');
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->inGroup('general', function ($blueprint): void {
|
||||
// New posts in admin default to markdown.
|
||||
$blueprint->add('default_content_format', 'markdown');
|
||||
// Import keeps sablog HTML unless --convert-to-markdown is passed.
|
||||
$blueprint->add('import_content_format', 'html');
|
||||
// When true, sablog:import may convert HTML body to Markdown.
|
||||
$blueprint->add('import_convert_html_to_markdown', false);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->inGroup('blog', function ($blueprint): void {
|
||||
$blueprint->add('posts_per_page', 10);
|
||||
$blueprint->add('allow_comments', true);
|
||||
$blueprint->add('comment_order', 'asc');
|
||||
$blueprint->add('show_views', true);
|
||||
$blueprint->add('show_author', true);
|
||||
$blueprint->add('date_format', 'Y-m-d');
|
||||
$blueprint->add('close_comments_on_old_posts', false);
|
||||
$blueprint->add('close_comments_days', 90);
|
||||
});
|
||||
|
||||
$this->migrator->inGroup('comment', function ($blueprint): void {
|
||||
$blueprint->add('guest_can_comment', true);
|
||||
$blueprint->add('require_moderation', false);
|
||||
$blueprint->add('rate_limit_per_minute', 5);
|
||||
$blueprint->add('enable_website_field', true);
|
||||
$blueprint->add('forbidden_words', '');
|
||||
});
|
||||
|
||||
$this->migrator->inGroup('seo', function ($blueprint): void {
|
||||
$blueprint->add('robots_index', true);
|
||||
$blueprint->add('twitter_site', null);
|
||||
$blueprint->add('canonical_force_https', false);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
use Spatie\LaravelSettings\Migrations\SettingsMigration;
|
||||
|
||||
return new class extends SettingsMigration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
$this->migrator->inGroup('snippets', function ($blueprint): void {
|
||||
$blueprint->add('analytics_head', '');
|
||||
$blueprint->add('body_end', '');
|
||||
$blueprint->add('ads_sidebar', '');
|
||||
$blueprint->add('ads_article_top', '');
|
||||
$blueprint->add('ads_article_bottom', '');
|
||||
$blueprint->add('header_banner', '');
|
||||
$blueprint->add('custom_links_html', '');
|
||||
$blueprint->add('footer_html', '');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user