Skip to content

Commit ec4502f

Browse files
committed
Fix: clean up markdown formatting in documentation files
1 parent a94c6b2 commit ec4502f

File tree

3 files changed

+65
-59
lines changed

3 files changed

+65
-59
lines changed

docs/blade-templates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ slug: blade-templates
44
path: docs/v1/blade-templates
55
uri: /docs/1.x/blade-templates
66
---
7+
78
# Blade Templates
89

910
InspireCMS leverages Laravel's powerful Blade templating engine to create dynamic templates. This guide covers core Blade functionality specific to InspireCMS.
@@ -47,7 +48,7 @@ InspireCMS extends Blade with custom directives for accessing content properties
4748
> [!note]
4849
> For comprehensive coverage of property directives, see the [Content](./fe-content){.doc-link} documentation.
4950
50-
```php
51+
```blade
5152
<!-- Basic property access -->
5253
<h1>@property('hero', 'title')</h1>
5354
@@ -74,12 +75,11 @@ InspireCMS extends Blade with custom directives for accessing content properties
7475
```
7576

7677
> [!note]
78+
>
7779
> For layouts and template inheritance, see the [Layouts](./layouts){.doc-link} documentation.
78-
79-
> [!note]
80+
>
8081
> For components and reusable UI elements, see the [Components](./components){.doc-link} documentation.
81-
82-
> [!note]
82+
>
8383
> For template implementation examples, see the [Templates](./templates){.doc-link} documentation.
8484
8585
---

docs/components.md

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ slug: components
44
path: docs/v1/components
55
uri: /docs/1.x/components
66
---
7+
78
# Components
89

910
InspireCMS offers a powerful component system based on Laravel's Blade components to help you build modular, reusable interface elements.
@@ -14,11 +15,11 @@ InspireCMS offers a powerful component system based on Laravel's Blade component
1415

1516
Components in InspireCMS serve as the building blocks of your frontend templates. They:
1617

17-
- Encapsulate reusable interface elements
18-
- Allow passing parameters and content
19-
- Support theme-specific implementations
20-
- Enable advanced template composition
21-
- Improve code organization and maintainability
18+
- Encapsulate reusable interface elements
19+
- Allow passing parameters and content
20+
- Support theme-specific implementations
21+
- Enable advanced template composition
22+
- Improve code organization and maintainability
2223

2324
---
2425

@@ -30,28 +31,28 @@ InspireCMS supports several types of components:
3031

3132
Theme-specific components that define your site's visual elements:
3233

33-
- Layout components (header, footer, sidebar)
34-
- Content display components (cards, tabs, modals)
35-
- Navigation components (menus, breadcrumbs)
36-
- Media display components (galleries, sliders)
34+
- Layout components (header, footer, sidebar)
35+
- Content display components (cards, tabs, modals)
36+
- Navigation components (menus, breadcrumbs)
37+
- Media display components (galleries, sliders)
3738

3839
### 2. Content Components
3940

4041
Components that render specific types of content:
4142

42-
- Blog post components
43-
- Event listing components
44-
- Product display components
45-
- Team member components
43+
- Blog post components
44+
- Event listing components
45+
- Product display components
46+
- Team member components
4647

4748
### 3. Utility Components
4849

4950
Helper components for common UI patterns:
5051

51-
- Pagination components
52-
- Alert/notification components
53-
- Form input components
54-
- Loading indicators
52+
- Pagination components
53+
- Alert/notification components
54+
- Form input components
55+
- Loading indicators
5556

5657
## Component Directory Structure
5758

@@ -109,9 +110,9 @@ Use named slots to organize content within components:
109110
<x-slot:header>
110111
<h3>{{ $title }}</h3>
111112
</x-slot>
112-
113+
113114
<p>{{ $content }}</p>
114-
115+
115116
<x-slot:footer>
116117
<a href="{{ $url }}" class="btn">Read more</a>
117118
</x-slot>
@@ -133,7 +134,7 @@ Create a simple component:
133134
<span aria-hidden="true">&times;</span>
134135
</button>
135136
@endif
136-
137+
137138
<div class="alert-content">
138139
{{ $slot }}
139140
</div>
@@ -188,10 +189,10 @@ Create a component with defined props:
188189
Use this component:
189190

190191
```blade
191-
<x-dynamic-component :component="inspirecms_templates()->getComponentWithTheme('button')"
192-
type="success"
193-
size="lg"
194-
url="#"
192+
<x-dynamic-component :component="inspirecms_templates()->getComponentWithTheme('button')"
193+
type="success"
194+
size="lg"
195+
url="#"
195196
icon="check"
196197
class="my-4"
197198
>
@@ -213,19 +214,19 @@ class Gallery extends Component
213214
public $images;
214215
public $columns;
215216
public $lightbox;
216-
217+
217218
public function __construct($images = [], $columns = 3, $lightbox = true)
218219
{
219220
$this->images = $this->processImages($images);
220221
$this->columns = max(1, min(12, (int) $columns));
221222
$this->lightbox = $lightbox;
222223
}
223-
224+
224225
public function render()
225226
{
226227
return view('components.gallery');
227228
}
228-
229+
229230
private function processImages($images)
230231
{
231232
// Process and normalize image data
@@ -243,7 +244,7 @@ class Gallery extends Component
243244
}
244245
return null;
245246
}
246-
247+
247248
return [
248249
'url' => $image['url'] ?? '',
249250
'thumbnail' => $image['thumbnail'] ?? $image['url'] ?? '',
@@ -253,7 +254,7 @@ class Gallery extends Component
253254
];
254255
})->filter();
255256
}
256-
257+
257258
public function columnClass()
258259
{
259260
return 'col-' . (12 / $this->columns);
@@ -309,11 +310,11 @@ Build complex components by combining smaller ones:
309310
@if($title)
310311
<x-inspirecms-my-theme::section-title :text="$title" :subtitle="$subtitle" />
311312
@endif
312-
313+
313314
<div class="content-block-body">
314315
{{ $slot }}
315316
</div>
316-
317+
317318
@if(isset($footer))
318319
<div class="content-block-footer">
319320
{{ $footer }}
@@ -341,9 +342,9 @@ Create variants of components using attributes:
341342
'outline' => 'card-outline border-primary',
342343
'simple' => 'card-simple shadow-sm',
343344
];
344-
345+
345346
$variantClass = $variants[$variant] ?? $variants['default'];
346-
347+
347348
$classes = [
348349
'card',
349350
$variantClass,
@@ -374,7 +375,7 @@ Create components that render differently based on input:
374375
'card' => 'components.content.card-display',
375376
'minimal' => 'components.content.minimal-display',
376377
];
377-
378+
378379
$view = $modes[$mode] ?? $modes['full'];
379380
@endphp
380381
@@ -390,10 +391,10 @@ Group related components together:
390391
391392
<div class="form-group">
392393
<label for="{{ $name }}">{{ $label }}</label>
393-
<input
394-
type="{{ $type }}"
395-
id="{{ $name }}"
396-
name="{{ $name }}"
394+
<input
395+
type="{{ $type }}"
396+
id="{{ $name }}"
397+
name="{{ $name }}"
397398
{{ $attributes->merge(['class' => 'form-control']) }}
398399
>
399400
@error($name)
@@ -415,7 +416,7 @@ Create components that intelligently display content:
415416
416417
@php
417418
$documentTypeName = $content->documentType : 'default';
418-
419+
419420
// Try to find a specialized component for this document type
420421
$componentName = collect(["content.{$documentTypeName}-{$format}", "content.generic-{$format}"])
421422
// Check if the specialized component exists
@@ -440,6 +441,8 @@ Create components that intelligently display content:
440441
6. **Follow Naming Conventions**: Use consistent naming for components and props
441442
7. **Test Components**: Write tests to verify component rendering
442443

443-
> [!note]
444+
> [!note]
445+
>
444446
> For detailed examples of using components in templates, see the [Templates](./templates){.doc-link} documentation.
445-
> For integrating components into layouts, see the [Layouts](./layouts){.doc-link} documentation.
447+
>
448+
> For integrating components into layouts, see the [Layouts](./layouts){.doc-link} documentation.

docs/fe-content.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ slug: fe-content
44
path: docs/v1/fe-content
55
uri: /docs/1.x/fe-content
66
---
7+
78
# Content
89

910
Learn how to work with content in your frontend templates.
@@ -91,10 +92,10 @@ You can also access properties programmatically:
9192
if ($content->hasProperty('hero', 'title')) {
9293
// Get property value
9394
$title = $content->getPropertyValue('hero', 'title');
94-
95+
9596
// Get property value with fallback
9697
$subtitle = $content->getPropertyValue('hero', 'subtitle') ?? 'Default subtitle';
97-
98+
9899
// Get multilingual property with specific locale
99100
$frenchTitle = $content->getPropertyValue('hero', 'title', 'fr');
100101
}
@@ -132,18 +133,18 @@ Filter and sort content collections:
132133
```php
133134
// Get recent blog posts
134135
$recentPosts = inspirecms_content()->getUnderRealPath(
135-
path: 'blogs',
136-
isPublished: true,
136+
path: 'blogs',
137+
isPublished: true,
137138
sorting: ['__latest_version_publish_dt' => 'desc'],
138139
limit: 5,
139140
);
140141

141142
// Get paginated recent blog posts
142143
$recentPosts = inspirecms_content()->getPaginatedUnderRealPath(
143-
path: 'blogs',
144+
path: 'blogs',
144145
page: 1,
145146
perPage: 10,
146-
isPublished: true,
147+
isPublished: true,
147148
sorting: ['__latest_version_publish_dt' => 'desc'],
148149
);
149150

@@ -201,12 +202,14 @@ $paginatedContent = inspirecms_content()->getPaginatedByDocumentType(documentTyp
201202

202203
## Best Practices
203204

204-
- Use `inspirecms_content()` helper for retrieving content instead of direct database queries
205-
- Always check if properties exist before using them
206-
- Cache frequent content queries for better performance
207-
- For large content sets, use pagination to improve page load times
208-
- Use property directives in Blade templates for cleaner syntax
205+
- Use `inspirecms_content()` helper for retrieving content instead of direct database queries
206+
- Always check if properties exist before using them
207+
- Cache frequent content queries for better performance
208+
- For large content sets, use pagination to improve page load times
209+
- Use property directives in Blade templates for cleaner syntax
209210

210-
> [!note]
211+
> [!note]
212+
>
211213
> For details on how to use content properties in templates, see the [Blade](./blade-templates){.doc-link} documentation.
212-
> For examples of displaying content in components and layouts, see the [Components](./components){.doc-link} and [Layouts](./layouts){.doc-link} documentation.
214+
>
215+
> For examples of displaying content in components and layouts, see the [Components](./components){.doc-link} and [Layouts](./layouts){.doc-link} documentation.

0 commit comments

Comments
 (0)