Skip to content

Commit

Permalink
docs: fix a couple of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 2, 2023
1 parent 0634d49 commit b083493
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/2.guide/2.directory-structure/1.middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ definePageMeta({
function (to, from) {
// Custom inline middleware
},
"auth",
'auth',
],
});
</script>
Expand All @@ -94,11 +94,11 @@ You can expect the middleware to be run in the following order:
3. Custom inline middleware
4. `auth.ts`

### Ordering global middleware
### Ordering Global Middleware

By default, global middleware is executed alphabetically based on the filename.

However, there may be times you want to define a specific order. For example, in the last scenario, `setup.global,ts` may need to run before `analytics.global.ts`. In that case, we recommend prefixing global middleware with "alphabetical" numbering.
However, there may be times you want to define a specific order. For example, in the last scenario, `setup.global.ts` may need to run before `analytics.global.ts`. In that case, we recommend prefixing global middleware with 'alphabetical' numbering.

```text [middleware/ directory]
middleware/
Expand All @@ -108,7 +108,7 @@ middleware/
```

::alert{type=info icon=💡}
In case you're new to "alphabetical" numbering, remember that filenames are sorted as strings as not as numeric values. For example, `10.new.global.ts` would come before `2.new.global.ts`. This is why the example prefixes single digit numbers with `0`.
In case you're new to 'alphabetical' numbering, remember that filenames are sorted as strings, not as numeric values. For example, `10.new.global.ts` would come before `2.new.global.ts`. This is why the example prefixes single digit numbers with `0`.
::

## When Middleware Runs
Expand Down

0 comments on commit b083493

Please sign in to comment.