Skip to content

Commit e2002a7

Browse files
committed
Docs Tweaks
1 parent 8dc043a commit e2002a7

14 files changed

+91
-51
lines changed

docs/blade-helpers.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Blade Directives and Components
1+
---
2+
layout: _layouts.v1-docs
3+
title: Blade Directives
4+
description: Blade Directives
5+
order: 4
6+
---
27

3-
[TOC]
8+
# Blade Directives and Components
49

510
## The `@domid()` Blade Directive
611

docs/broadcasting.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Broadcasting Turbo Streams Over WebSockets With Laravel Echo
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Broadcasting
4+
description: Broadcasting Turbo Streams
5+
order: 7
6+
---
47

5-
## Introduction
8+
# Broadcasting Turbo Streams Over WebSockets With Laravel Echo
69

710
So far, we have used Turbo Streams over HTTP to handle the case of updating multiple parts of the page for a single user after a form submission. In addition to that, you may want to broadcast model changes over WebSockets to all users that are viewing the same page. Although nice, **you don't have to use WebSockets if you don't have the need for it. You may still benefit from Turbo Streams over HTTP.**
811

docs/conventions.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Conventions
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Convetions
4+
description: All the (optional) conventions and recommendations
5+
order: 3
6+
---
47

5-
## Introduction
8+
# Conventions
69

710
The conventions described below are **NOT mandatory**. Feel free to pick what you like and also come up with your own conventions. With that out of the way, here's a list of conventions you may find helpful.
811

docs/csrf.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: _layouts.v1-docs
3+
title: CSRF Protection
4+
description: CSRF Protection
5+
order: 10
6+
---
7+
18
# CSRF Protection
29

310
Laravel has built-in CSRF protection in place. It essentially prevents our app from processing any non-GET requests that don't have a valid CSRF Token in them. So, to allow a POST form to be processed, we usually need to add a `@csrf` Blade directive to our forms:

docs/helper-functions.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Helper Functions
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Helper Functions
4+
description: All the helper functions the package provides
5+
order: 5
6+
---
47

5-
## Introduction
8+
# Helper Functions
69

710
The package ships with a set of helper functions. These functions are all namespaced under `Tonysm\\TurboLaravel\\` but we also add them globally for convenience.
811

docs/index.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/installation.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: _layouts.v1-docs
3+
title: Installation
4+
description: Installation
5+
order: 1
6+
---
7+
18
# Installation
29

310
Turbo Laravel may be installed via Composer:

docs/known-issues.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Known Issues
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Known Issues
4+
description: Known Issues
5+
order: 13
6+
---
47

5-
## Introduction
8+
# Known Issues
69

710
If you ever encounter an issue with the package, look here first for documented solutions.
811

docs/livewire.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Livewire
1+
---
2+
layout: _layouts.v1-docs
3+
title: Livewire
4+
description: Livewire Integration
5+
order: 8
6+
---
27

3-
[TOC]
8+
# Livewire
49

510
Hotwire and Livewire can be used together. However, you need to add a JS plugin to make this happen.
611

docs/overview.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
layout: _layouts.v1-docs
3+
title: Overview
4+
description: Overview
5+
order: 2
6+
---
7+
18
# Overview
29

310
When Turbo.js is installed, Turbo Drive will be enabled by default. Turbo Drive will turn links and form submissions into fetch requests (AJAX) and will replace the page with the response it gets.

docs/testing.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Testing
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Testing
4+
description: Testing Helpers
5+
order: 12
6+
---
47

5-
## Introduction
8+
# Testing
69

710
There are two aspects of your application using Turbo Laravel that are specific this approach itself:
811

docs/turbo-native.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Turbo Native
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Turbo Native
4+
description: Turbo Native Helpers
5+
order: 11
6+
---
47

5-
## Introduction
8+
# Turbo Native
69

710
Hotwire also has a [mobile side](https://turbo.hotwired.dev/handbook/native), and the package provides some goodies on this front too.
811

docs/turbo-streams.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Turbo Streams
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Turbo Streams
4+
description: The Turbo Streams Components and Helpers
5+
order: 6
6+
---
47

5-
## Introduction
8+
# Turbo Streams
69

710
Out of everything Turbo provides, it's Turbo Streams that benefits the most from a tight back-end integration.
811

docs/validation-response-redirects.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
# Validation Response
2-
3-
[TOC]
1+
---
2+
layout: _layouts.v1-docs
3+
title: Validation Response
4+
description: Validation Response
5+
order: 9
6+
---
47

5-
## Introduction
8+
# Validation Response
69

710
By default, Laravel will redirect failed validation exceptions "back" to the page the triggered the request. This is a bit problematic when it comes to Turbo Frames, since a form might be included in a page that don't render the form initially, and after a failed validation exception from a form submission we would want to re-render the form with the invalid messages.
811

0 commit comments

Comments
 (0)