Skip to content

Commit c233863

Browse files
committed
fix: Clean up formatting and comments in Configuration.md for better readability
1 parent d710471 commit c233863

1 file changed

Lines changed: 51 additions & 41 deletions

File tree

docs/getting-started/Configuration.md

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ php artisan vendor:publish --tag="inspirecms-config"
1818
'system' => [
1919
/**
2020
* Whether to include an X-Powered-By header in HTTP responses
21-
*
22-
* When true, InspireCMS adds an X-Powered-By HTTP header to responses.
21+
*
22+
* When true, InspireCMS adds an X-Powered-By HTTP header to responses.
2323
*/
2424
'send_powered_by_header' => true,
2525

2626
/**
2727
* License configuration for InspireCMS
28-
*
28+
*
2929
* These settings are required for the CMS to validate your license.
3030
*/
3131
'license' => [
@@ -34,7 +34,7 @@ php artisan vendor:publish --tag="inspirecms-config"
3434
// Your InspireCMS license secret used for validation
3535
'secret' => env('INSPIRECMS_LICENSE_SECRET'),
3636
],
37-
37+
3838
/**
3939
* Control how InspireCMS interacts with key plugins
4040
*/
@@ -47,7 +47,7 @@ php artisan vendor:publish --tag="inspirecms-config"
4747

4848
### Authentication
4949

50-
Configure how users authenticate with your CMS \([learn more about laravel authentication]((https://laravel.com/docs/12.x/authentication#adding-custom-guards))\):
50+
Configure how users authenticate with your CMS \([learn more about laravel authentication](<(https://laravel.com/docs/12.x/authentication#adding-custom-guards)>)\):
5151

5252
```php
5353
'auth' => [
@@ -80,7 +80,7 @@ Configure how users authenticate with your CMS \([learn more about laravel authe
8080

8181
/**
8282
* Security settings to protect against brute-force attacks
83-
*
83+
*
8484
* Number of failed attempts before lockout
8585
*/
8686
'failed_login_attempts' => 5, // Number of attempts before account lockout
@@ -92,14 +92,14 @@ Configure how users authenticate with your CMS \([learn more about laravel authe
9292

9393
/**
9494
* Controls when super admin checks are performed in the authentication flow
95-
*
95+
*
9696
* Allowed values: before, after, none
9797
*/
98-
'skip_super_admin_check' => 'before',
98+
'skip_super_admin_check' => 'before',
9999

100100
/**
101101
* Skip account verification for users.
102-
*
102+
*
103103
* Set to true to skip account email verification requirements.
104104
*/
105105
'skip_account_verification' => false,
@@ -109,17 +109,18 @@ Configure how users authenticate with your CMS \([learn more about laravel authe
109109
### Media Management
110110

111111
Configure media uploads, storage, and processing:
112+
112113
```php
113114
'media' => [
114-
115+
115116
/**
116117
* User avatar storage configuration
117118
*/
118119
'user_avatar' => [
119120
'disk' => 'public', // Storage disk to use (public, s3, etc.)
120121
'directory' => 'avatars', // Subdirectory where avatars will be stored
121122
],
122-
123+
123124
/**
124125
* Media library configuration
125126
*/
@@ -128,14 +129,14 @@ Configure media uploads, storage, and processing:
128129
// Use 's3' or other drivers for cloud storage
129130
'directory' => '', // Base directory for media files (empty for root)
130131
// Set to 'media' or similar for better organization
131-
132+
132133
/**
133134
* Allowed file types
134-
*
135+
*
135136
* e.g. ['image/jpeg', 'image/png', 'video/mp4']
136137
*/
137-
'allowed_mime_types' => [],
138-
138+
'allowed_mime_types' => [],
139+
139140
/**
140141
* Maximum file size in KB
141142
*/
@@ -162,9 +163,9 @@ Configure media uploads, storage, and processing:
162163
* HTTP middleware applied to media requests
163164
*/
164165
'middleware' => [
165-
'cache.headers:public;max_age=2628000;etag',
166+
'cache.headers:public;max_age=2628000;etag',
166167
],
167-
168+
168169
/**
169170
* Responsive image generation settings
170171
*/
@@ -220,7 +221,7 @@ Optimize performance with caching configurations:
220221
// For production environments, consider enabling a persistent cache driver
221222
// such as Redis or Memcached in your .env file:
222223
// CACHE_DRIVER=redis
223-
224+
224225
// Monitor cache usage with: php artisan inspirecms:cache-stats
225226
],
226227
```
@@ -240,7 +241,7 @@ use SolutionForest\InspireCms\Filament\Resources as FilamentResources;
240241
'navigation_position' => 'top', // left, top
241242
'panel_id' => 'cms', // Internal identifier for the panel
242243
// Must be unique if using multiple panels
243-
'path' => 'cms', // URL path segment for admin area
244+
'path' => 'cms', // URL path segment for admin area
244245
// Example: https://yoursite.com/cms
245246
'brand' => [ // More info https://filamentphp.com/docs/3.x/panels/themes#adding-a-logo
246247
'name' => 'InspireCMS', // Display name shown in admin header
@@ -253,25 +254,25 @@ use SolutionForest\InspireCms\Filament\Resources as FilamentResources;
253254
'polling_interval' => '30s', // How often to check for new notifications
254255
// Lower for more responsiveness, higher for reduced server load
255256
],
256-
'background_image' => 'https://random.danielpetrica.com/api/random?format=regular',
257+
'background_image' => 'https://random.danielpetrica.com/api/random?format=regular',
257258
// Login page background
258259
// Replace with your own image path for branding
259-
260+
260261
// Resource classes define admin CRUD interfaces
261262
// Replace with custom classes to modify behavior
262263
'resources' => [
263264
'content' => FilamentResources\ContentResource::class,
264265
'document_type' => FilamentResources\DocumentTypeResource::class,
265266
// ... other resources
266267
],
267-
268+
268269
// Admin panel pages (replace to customize specific pages)
269270
'pages' => [
270271
'dashboard' => FilamentPages\Dashboard::class,
271272
'export' => FilamentPages\Export::class,
272273
'health' => FilamentPages\Health::class,
273274
],
274-
275+
275276
// Navigation clusters (groupings of admin features)
276277
'clusters' => [
277278
'content' => FilamentClusters\Content::class,
@@ -297,7 +298,7 @@ Manage data migration and content portability:
297298

298299
```php
299300
'import_export' => [
300-
301+
301302
'imports' => [
302303

303304
// Storage configuration for imports
@@ -347,23 +348,23 @@ use SolutionForest\InspireCms\Support\Models as SupportModels;
347348
'table_name_prefix' => 'cms_', // Prefix for database tables
348349
// Change requires database migration update
349350
'morph_map_prefix' => 'cms_', // Prefix for polymorphic relationships
350-
351+
351352
// Model class mappings - replace with your own to extend functionality
352353
// Example: 'user' => App\Models\User::class
353354
'fqcn' => [
354355
'content' => Models\Content::class,
355356
'content_path' => Models\ContentPath::class,
356357
// ... other models
357358
],
358-
359+
359360
/**
360361
* Policy mappings control authorization
361362
*/
362363
'policies' => [
363364
'content' => Policies\ContentStatusPolicy::class,
364365
// Add custom policies here
365366
],
366-
367+
367368
/**
368369
* Auto-cleanup settings for database tables that can grow large
369370
*/
@@ -395,7 +396,7 @@ Define and manage custom fields for content types:
395396
\SolutionForest\InspireCms\Fields\Configs\Repeater::class, // Repeatable field groups
396397
\SolutionForest\InspireCms\Fields\Configs\Tags::class, // Tag selection field
397398

398-
// Rich content editors
399+
// Rich content editors
399400
\SolutionForest\InspireCms\Fields\Configs\RichEditor::class, // WYSIWYG editor
400401
\SolutionForest\InspireCms\Fields\Configs\MarkdownEditor::class, // Markdown support
401402

@@ -426,7 +427,7 @@ use SolutionForest\InspireCms\Filament\Widgets as FilamentWidgets;
426427
'guard_actions' => [
427428

428429
],
429-
430+
430431
/**
431432
* Dashboard widgets requiring permissions to view
432433
*/
@@ -462,13 +463,13 @@ Configure how InspireCMS resolves various components:
462463
'resolvers' => [
463464
// Service classes for resolving common entities
464465
// Replace with custom classes to modify behavior
465-
466+
466467
// How the current user is determined
467468
'user' => \SolutionForest\InspireCms\Support\Resolvers\UserResolver::class,
468-
469+
469470
// How published content is retrieved and filtered
470471
'published_content' => \SolutionForest\InspireCms\Resolvers\PublishedContentResolver::class,
471-
472+
472473
// Add custom resolvers here as needed for extending functionality
473474
],
474475
```
@@ -484,9 +485,18 @@ Control how InspireCMS handles frontend requests:
484485
// Example: ['web', 'localize', 'cache']
485486
// Core middleware like 'web' is already applied
486487
],
487-
// Handles URL segment parsing for content routing
488-
// Replace with custom class to implement custom URL schemes
488+
/**
489+
* Handles URL segment parsing for content routing
490+
*
491+
* Replace with custom class to implement custom URL schemes
492+
*/
489493
'segment_provider' => \SolutionForest\InspireCms\Content\DefaultSegmentProvider::class,
494+
/**
495+
* Class that handles content previews
496+
*
497+
* Override with a custom class to implement specialized preview behavior
498+
*/
499+
'preview_provider' => \SolutionForest\InspireCms\Content\DefaultPreviewProvider::class,
490500
],
491501
```
492502

@@ -499,10 +509,10 @@ Configure automatic sitemap generation:
499509
// Class responsible for generating sitemaps
500510
// Replace with custom class for specialized sitemap behavior
501511
'generator' => \SolutionForest\InspireCms\Sitemap\SitemapGenerator::class,
502-
512+
503513
// Where the sitemap is stored - should be in public web directory
504514
'file_path' => public_path('sitemap.xml'),
505-
515+
506516
// To regenerate sitemap: php artisan inspirecms:generate-sitemap
507517
],
508518
```
@@ -528,7 +538,7 @@ Set up automated background tasks:
528538
'schedule' => 'daily', // Run once per day
529539
// Cleanup settings...
530540
],
531-
541+
532542
// To use scheduled tasks, ensure Laravel's scheduler is running:
533543
// * * * * * cd /path-to-project && php artisan schedule:run >> /dev/null 2>&1
534544
],
@@ -543,10 +553,10 @@ Configure language and translation settings:
543553
// Languages available in the admin interface
544554
// Format: language code or locale identifier
545555
'user_preferred_locales' => ['en','zh_CN','zh_TW'],
546-
556+
547557
// Add new languages via the admin interface
548558
// or directly in the languages table
549-
559+
550560
// To generate translation files: php artisan lang:publish
551561
],
552562
```
@@ -577,7 +587,7 @@ class InspireCmsConfigServiceProvider extends ServiceProvider
577587
public function boot()
578588
{
579589
InspireCmsConfig::set('custom.setting', 'value');
580-
590+
581591
// Override existing settings
582592
InspireCmsConfig::set('template.default_theme', 'custom-theme');
583593
}
@@ -599,4 +609,4 @@ Register your provider in `config/app.php`:
599609
2. **Create a separate configuration file** for complex custom configurations
600610
3. **Don't edit the vendor files** directly, always extend and override using Laravel's configuration system
601611
4. **Clear configuration cache** after making changes: `php artisan config:clear`
602-
5. **Document your customizations** for team members and future reference
612+
5. **Document your customizations** for team members and future reference

0 commit comments

Comments
 (0)