Skip to content

Commit ef1dd3f

Browse files
committed
Merge remote-tracking branch 'origin/docs/update-plugin-documentation' into 5.x
2 parents 64fc48c + 9849a17 commit ef1dd3f

6 files changed

Lines changed: 86 additions & 74 deletions

File tree

docs/content-drafts-revisions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ Drafts are visible only in the admin panel and not on your live site.
4343

4444
Drafts are clearly marked in the content list:
4545

46-
- Status indicator shows "Draft"
47-
- Often color-coded differently from published content
48-
- Show an editing icon
46+
- Status indicator shows "Draft"
47+
- Often color-coded differently from published content
48+
- Show an editing icon
4949

5050
### Editing Drafts
5151

docs/content-routing.md

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: content-routing
44
path: docs/v1/content-routing
55
uri: /docs/v1/content-routing
66
heading: Content Routing
7-
brief:
7+
brief:
88
quick_links: []
99
---
1010

@@ -30,8 +30,8 @@ By default, content URLs follow a hierarchical structure:
3030

3131
For example:
3232

33-
- `/about`: A top-level "About" page
34-
- `/products/widgets/blue-widget`: A "Blue Widget" page under the "Widgets" section of "Products"
33+
- `/about`: A top-level "About" page
34+
- `/products/widgets/blue-widget`: A "Blue Widget" page under the "Widgets" section of "Products"
3535

3636
---
3737

@@ -88,8 +88,8 @@ Content slugs are URL-friendly versions of content titles used in routes.
8888

8989
When creating content, InspireCMS automatically generates a slug from the title:
9090

91-
- "Hello World" becomes "hello-world"
92-
- "Top 10 Tips & Tricks" becomes "top-10-tips-tricks"
91+
- "Hello World" becomes "hello-world"
92+
- "Top 10 Tips & Tricks" becomes "top-10-tips-tricks"
9393

9494
### Custom Slugs
9595

@@ -104,42 +104,44 @@ To use a custom slug:
104104

105105
Slugs must:
106106

107-
- Contain only lowercase letters, numbers, and hyphens
108-
- Not conflict with existing routes or reserved words
109-
- Be unique within their parent section
107+
- Contain only lowercase letters, numbers, and hyphens
108+
- Not conflict with existing routes or reserved words
109+
- Be unique within their parent section
110110

111111
### Customizing the Slug Generator
112+
112113
You can customize how slugs are generated by modifying the `slug_generator` setting in your configuration file. Here's how:
113114

114115
1. Locate `frontend` section in the `config/inspirecms.php` file.
115116

116117
2. **Edit the Slug Generator**:
117118
Change the `slug_generator` to your custom class:
118-
```php
119-
'frontend' => [
120-
'slug_generator' => \App\CustomSlugGenerator::class,
121-
],
122-
```
119+
120+
```php
121+
'frontend' => [
122+
'slug_generator' => \App\CustomSlugGenerator::class,
123+
],
124+
```
123125

124126
3. **Create Your Custom Slug Generator**:
125127
Implement your custom slug generator class:
126-
```php
127-
namespace App;
128128

129-
use SolutionForest\InspireCms\Content\DefaultSlugGenerator;
129+
```php
130+
namespace App;
130131

131-
class CustomSlugGenerator extends DefaultSlugGenerator {
132-
public function generate($text, $language = DefaultSlugGenerator::LANG_AUTO, $separator = '-') {
133-
// Custom logic for slug generation
134-
return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $text)));
135-
}
136-
}
137-
```
132+
use SolutionForest\InspireCms\Content\DefaultSlugGenerator;
133+
134+
class CustomSlugGenerator extends DefaultSlugGenerator {
135+
public function generate($text, $language = DefaultSlugGenerator::LANG_AUTO, $separator = '-') {
136+
// Custom logic for slug generation
137+
return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $text)));
138+
}
139+
}
140+
```
138141

139142
4. **Test Your Changes**:
140143
After saving your configuration and custom class, create new content or edit existing content to see your custom slug generation in action.
141144

142-
143145
---
144146

145147
## Route Registration
@@ -210,9 +212,9 @@ php artisan route:clear
210212

211213
This is useful after:
212214

213-
- Bulk content changes
214-
- Changing route configuration
215-
- Upgrading InspireCMS
215+
- Bulk content changes
216+
- Changing route configuration
217+
- Upgrading InspireCMS
216218

217219
---
218220

@@ -308,11 +310,11 @@ class AppServiceProvider extends ServiceProvider
308310

309311
### Managing Content Redirects
310312

311-
- Edit the content item in the admin panel
312-
- Navigate to the "SEO" tab
313-
- Scroll down to the "Redirect" section
314-
- Set the destination URL and redirect type (301 permanent, 302 temporary)
315-
- Save the content
313+
- Edit the content item in the admin panel
314+
- Navigate to the "SEO" tab
315+
- Scroll down to the "Redirect" section
316+
- Set the destination URL and redirect type (301 permanent, 302 temporary)
317+
- Save the content
316318

317319
---
318320

@@ -326,7 +328,7 @@ php artisan inspirecms:routes
326328

327329
This command shows all registered content routes with:
328330

329-
- URL pattern
330-
- Name
331-
- Bindings
332-
- Middleware
331+
- URL pattern
332+
- Name
333+
- Bindings
334+
- Middleware

docs/customize-the-admin-panel.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ quick_links: []
1212

1313
The InspireCMS admin panel is built on [Filament](https://filamentphp.com/), a powerful admin panel framework for Laravel applications. This integration allows you to:
1414

15-
- Create custom admin pages
16-
- Add new resources for managing database models
17-
- Organize related functionality into clusters
18-
- Define custom dashboard widgets
19-
- Extend existing admin functionality
20-
- Customize the look and feel of the admin panel
15+
- Create custom admin pages
16+
- Add new resources for managing database models
17+
- Organize related functionality into clusters
18+
- Define custom dashboard widgets
19+
- Extend existing admin functionality
20+
- Customize the look and feel of the admin panel
2121

2222
---
2323

@@ -846,7 +846,7 @@ class StatsOverview extends BaseWidget
846846

847847
## Further Resources
848848

849-
- [Filament Documentation](https://filamentphp.com/docs)
850-
- [Laravel Documentation](https://laravel.com/docs)
849+
- [Filament Documentation](https://filamentphp.com/docs)
850+
- [Laravel Documentation](https://laravel.com/docs)
851851

852852
With these tools and techniques, you can extend and customize the InspireCMS admin panel to suit your specific requirements while maintaining a consistent and user-friendly interface.

docs/fe-content.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ $paginatedContentDto = inspirecms_content()->getPaginatedByDocumentType(document
210210

211211
## Best Practices
212212

213-
- Use `inspirecms_content()` helper for retrieving content instead of direct database queries
214-
- Always check if properties exist before using them
215-
- Cache frequent content queries for better performance
216-
- For large content sets, use pagination to improve page load times
217-
- Use property directives in Blade templates for cleaner syntax
213+
- Use `inspirecms_content()` helper for retrieving content instead of direct database queries
214+
- Always check if properties exist before using them
215+
- Cache frequent content queries for better performance
216+
- For large content sets, use pagination to improve page load times
217+
- Use property directives in Blade templates for cleaner syntax
218218

219219
> [!note]
220220
>

docs/installing.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: installing
44
path: docs/v1/installing
55
uri: /docs/v1/installing
66
heading: Installing
7-
brief:
7+
brief:
88
quick_links: []
99
---
1010

@@ -14,6 +14,16 @@ Before beginning installation, ensure your environment meets the [system require
1414

1515
---
1616

17+
## Version Compatibility
18+
19+
| Filament Version | Plugin Version |
20+
| ---------------- | -------------- |
21+
| v3 | 1.x.x |
22+
| v4 | 4.x.x |
23+
| v5 | 5.x.x |
24+
25+
---
26+
1727
## Standard Installation
1828

1929
### Step 1: Create a Laravel Application
@@ -85,8 +95,8 @@ InspireCMS requires queue workers and scheduled jobs for image conversion, backg
8595

8696
For development, you can run these commands manually in separate terminals:
8797

88-
- `php artisan queue:work` (for background jobs)
89-
- `php artisan schedule:work` (for scheduled tasks)
98+
- `php artisan queue:work` (for background jobs)
99+
- `php artisan schedule:work` (for scheduled tasks)
90100

91101
For detailed configuration options, refer to the [Laravel Queue documentation](https://laravel.com/docs/queues) and [Task Scheduling documentation](https://laravel.com/docs/scheduling).
92102

docs/media.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ The media library is accessible from: **Admin Panel** > **Media**
1919

2020
The media library interface includes:
2121

22-
- **Folders**: Organize media in a hierarchical structure
23-
- **Search**: Find media by filename, type, or metadata
24-
- **Filters**: Filter by date, file type, or custom attributes
25-
- **Sorting**: Arrange files by name, date or size
22+
- **Folders**: Organize media in a hierarchical structure
23+
- **Search**: Find media by filename, type, or metadata
24+
- **Filters**: Filter by date, file type, or custom attributes
25+
- **Sorting**: Arrange files by name, date or size
2626

2727
### File Details
2828

2929
Click on a file to view detailed information:
3030

31-
- **Properties**: Technical information (dimensions, format, size)
32-
- **Actions**: Download, edit, move, or delete
31+
- **Properties**: Technical information (dimensions, format, size)
32+
- **Actions**: Download, edit, move, or delete
3333

3434
---
3535

@@ -148,13 +148,13 @@ Generate responsive image variants:
148148

149149
Every media file includes standard metadata:
150150

151-
- Filename
152-
- File type and extension
153-
- File size
154-
- Upload date
155-
- Uploader
156-
- Dimensions (for images)
157-
- Duration (for audio/video)
151+
- Filename
152+
- File type and extension
153+
- File size
154+
- Upload date
155+
- Uploader
156+
- Dimensions (for images)
157+
- Duration (for audio/video)
158158

159159
### Custom Metadata
160160

@@ -291,9 +291,9 @@ class MediaAssetPolicy extends BasePolicy
291291

292292
## Best Practices
293293

294-
- **Organize Logically**: Use a consistent folder structure
295-
- **Meaningful Filenames**: Use descriptive, URL-friendly filenames
296-
- **Complete Metadata**: Add alt text and descriptions for accessibility
297-
- **Optimize Images**: Use appropriate file formats and compression
298-
- **Responsive Images**: Use responsive techniques for different screen sizes
299-
- **Accessibility**: Ensure all media has appropriate alt text
294+
- **Organize Logically**: Use a consistent folder structure
295+
- **Meaningful Filenames**: Use descriptive, URL-friendly filenames
296+
- **Complete Metadata**: Add alt text and descriptions for accessibility
297+
- **Optimize Images**: Use appropriate file formats and compression
298+
- **Responsive Images**: Use responsive techniques for different screen sizes
299+
- **Accessibility**: Ensure all media has appropriate alt text

0 commit comments

Comments
 (0)