Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0 #1311

Merged
merged 44 commits into from
May 9, 2024
Merged

5.0 #1311

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
65b6632
add upgrade guide
jasonvarga Feb 27, 2024
7826620
explain that seeds are removed from shuffle modifier
jasonvarga Mar 6, 2024
dd556ec
[5.x] Document Addon Testing (#1258)
duncanmcclean Mar 13, 2024
65a31ff
[5.x] Remove docs for the Antlers Regex Parser (#1242)
duncanmcclean Mar 13, 2024
7704119
Merge remote-tracking branch 'origin/master' into 5.0
duncanmcclean Mar 13, 2024
a7226f6
fill in min php/laravel versions, and recommend upgrading
jasonvarga Mar 14, 2024
9fba930
please
jasonvarga Mar 14, 2024
88f1a36
nevermind i figured it out
jasonvarga Mar 14, 2024
62cf613
slugs
jasonvarga Mar 20, 2024
6d30bd1
explain how to use temporary file uploads
jasonvarga Mar 28, 2024
fcc2a83
Tweak note about supported Laravel versions
duncanmcclean Mar 28, 2024
0fe2703
[5.x] Update string based validation rules (#1298)
jesseleite Mar 28, 2024
07ad278
link to upgrade guides so we dont have maintain two identical lists
jasonvarga Mar 28, 2024
101a122
document rule changes
jasonvarga Mar 28, 2024
1a298d1
explain fake sql queries and how to disable them
jasonvarga Apr 1, 2024
c052016
[5.x] Document new `findOrFail` methods on repositories (#1305)
duncanmcclean Apr 2, 2024
9dd1d10
Merge remote-tracking branch 'origin/master' into 5.0
duncanmcclean Apr 2, 2024
ac6eb69
Terms repository: Add note about `findOrFail` now we have a `find` ex…
duncanmcclean Apr 2, 2024
557f3ac
bard
jasonvarga Apr 2, 2024
2a5fab7
helpers are removed
jasonvarga Apr 3, 2024
4517940
Merge remote-tracking branch 'origin/master' into 5.0
duncanmcclean Apr 4, 2024
3a5d4d5
SVG tag: The default value for the `sanitize` parameter is now `true`
duncanmcclean Apr 4, 2024
045de7e
[5.x] Multi-site documentation overhaul (#1307)
jesseleite Apr 5, 2024
58fe06e
sites
jasonvarga Apr 5, 2024
67ee3f4
Tweak sites.
jesseleite Apr 5, 2024
1b3c956
Note on text `direction`.
jesseleite Apr 5, 2024
4615188
[5.x] Upgrade Guide: Add note about pagination view changes (#1312)
duncanmcclean Apr 8, 2024
b95a760
more upgrade guiding
jasonvarga Apr 9, 2024
e730520
not anymore
jasonvarga Apr 10, 2024
a971299
escaping params
jasonvarga Apr 10, 2024
651cbd4
Move `content/sites.yaml` to `resources/settings/sites.yaml`.
jesseleite Apr 10, 2024
d82003e
Move `resources/settings/sites.yaml` to `resources/sites.yaml`.
jesseleite Apr 10, 2024
f75e2d0
Update screenshot, since we moved `Sites` into `Settings` section.
jesseleite Apr 11, 2024
d6e2fb5
Update `AddonTestCase` import in upgrade guide
duncanmcclean Apr 12, 2024
0f96ca2
Add "Testing in Addons" page to Extending docs (#1323)
duncanmcclean Apr 15, 2024
cd068ed
Add note to upgrade guide about the new `please` file
duncanmcclean Apr 15, 2024
8514375
Add note to the upgrade guide about the Laravel Shift discount
duncanmcclean Apr 15, 2024
baa8da9
Merge branch '5.0' of github.com:statamic/docs into 5.0
duncanmcclean Apr 15, 2024
8717943
Merge remote-tracking branch 'origin/master' into 5.0
duncanmcclean Apr 18, 2024
e70d07f
user role stuff
jasonvarga Apr 24, 2024
20719b9
use async in example
jasonvarga May 8, 2024
e34f6ba
Add sentence about running Statamic without an internet connection
duncanmcclean May 8, 2024
36951d6
you can disable svg tag sanitization
jasonvarga May 8, 2024
3fe74a9
explain default value behavior change
jasonvarga May 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
416 changes: 416 additions & 0 deletions content/collections/docs/4-to-5.md

Large diffs are not rendered by default.

426 changes: 0 additions & 426 deletions content/collections/docs/antlers-legacy.md

This file was deleted.

30 changes: 20 additions & 10 deletions content/collections/docs/antlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ blueprint: page
title: 'Antlers Templates'
intro: |-
Antlers is a simple and powerful templating engine provided with Statamic. It can fetch and filter content, display, modify, and set variables, tap into core features like user authentication and search, and handle complex logic. Coming from Laravel and want to stick to Blade? [We got you covered](/blade).
:::tip Hot Tip
For sites running Statamic 3.2 and older you'll need to use the [legacy Antlers parser](/antlers-legacy). For all other projects, keep reading. You're in the right place.
:::
template: page
---
## Overview
Expand All @@ -32,13 +29,22 @@ This is a very simple Antlers tag:

### Configuring

You can configure advanced settings (or switch to the [legacy Antlers parser](/antlers-legacy)) in `config/statamic/antlers.php`. The `runtime` version is the fresh new default parser as of Statamic 3.4, as documented on this very page.
You can configure advanced settings, like guarded variables, tags & modifiers in `config/statamic/antlers.php`.

```php
// config/statamic/antlers.php
return [
'version' => 'runtime',
// ...
'guardedVariables' => [
'config.app.key',
],

'guardedTags' => [
//
],

'guardedModifiers' => [
//
],
];
```

Expand Down Expand Up @@ -375,10 +381,6 @@ There are more than 150 built-in [modifiers](/reference/modifiers) that can do a

You can even create [Macros](/modifiers/macro) to combine sets of often used modifiers into one, new reusable one.

#### Legacy Syntax

The New Antlers Parser still supports what we're now calling the "[Legacy Syntax](/antlers-legacy#stringshorthand-style)" styles, and will continue to do so until Statamic 4.0.

### Creating Variables

You can now set variables by using the assignment operator, `=`.
Expand Down Expand Up @@ -1283,6 +1285,14 @@ The `@` can also be used to escape individual braces within tag parameters or st
// "string {foo} bar"
```

### Tag parameters

You may ignore the contents of tag parameters by prefixing the parameter with a backslash. This could be useful allow you to avoid having to escape each curly brace like the example above if you are providing some JS/JSON in a parameter:

```
{{ form:create \x-data="{ submittable: false }" }}
```

### The `noparse` Tag

Use this method if you need to prevent entire code blocks from being parsed.
Expand Down
12 changes: 12 additions & 0 deletions content/collections/docs/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ Statamic will try to detect why you're receiving a specific exception and provid

<img src="/img/clippy-docs.gif" class="fixed z-10 cursor-pointer bottom-0 right-0 m-8" x-show.transition="showEasterEgg" x-on:click="showEasterEgg = false">


## Fake SQL Queries

By default, Statamic doesn't use a database, so our query builders don't actually execute SQL queries. However, we "fake" the queries so that they appear in your preferred debugging tools like [Ray](https://myray.app) or Debugbar (more on that below).

They are enabled when you're in debug mode, but if you'd like to disable them you can do so in `config/statamic/system.php`:

```php
'fake_sql_queries' => false,
```


## Debug Bar

The debug bar is a convenient way to explore many of the things happening in any given page request. You can see data Statamic is fetching, which views are being rendered, information on the current route, available variables, user's session, request data, and more.
Expand Down
18 changes: 10 additions & 8 deletions content/collections/docs/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ email:
# other settings here
```

If you don't want the attachments to be kept around on your server, you should pick the `files` fieldtype option explained in the [File Uploads](#file-uploads) section.

### Using Markdown Mailable Templates

Laravel allows you to create email templates [using Markdown](https://laravel.com/docs/mail#markdown-mailables). It's pretty simple to wire these up with your form emails:
Expand Down Expand Up @@ -413,15 +415,15 @@ You can customize the components further by reviewing the [Laravel documentation

Sometimes your fans want to show you things they've created, like scissor-cut love letters and innocent selfies with cats. No problem! File input types to the rescue. Inform Statamic you intend to collect files, specify where you'd like the uploads to go, and whether you'd like them to simply be placed in a directory somewhere, or become reusable Assets.

First up, add `files="true"` to your form tag. (This will add `enctype="multipart/form-data"` to the generated `<form>` tag. That's always so difficult to remember.)
First, add a file upload field to your blueprint:
- Add an `assets` field if you want the uploaded files to be stored in one of your asset containers.
- Add a `files` field if you're only wanting to attach the uploads to the email. Anything uploaded using this fieldtype will be attached and then deleted after the emails are sent.

```
{{ form:create formset="contact" files="true" }}
...
{{ /form:create }}
```
Then decide if you need single or multiple files to be uploaded.

### Single files

Then add an `assets` field to your blueprint, with a `max_files` setting of `1`:
On your field, add a `max_files` setting of `1`:

```
<input type="file" name="cat_selfie" />
Expand All @@ -443,7 +445,7 @@ You have two methods available to you:

First, You can create separate fields for each upload. This is useful if each has a separate purpose, like Resume, Cover Letter, and Headshot. You'll need to explicitly create each and every one in your formset.

Or, you can enable multiple files on one field by dropping the `max_files` setting on your assets field, and using array syntax on your input by adding a set of square brackets to the `name` attribute:
Or, you can enable multiple files on one field by dropping the `max_files` setting on your field, and using array syntax on your input by adding a set of square brackets to the `name` attribute:

```
<input type="file" name="selfies[]" multiple />
Expand Down
2 changes: 1 addition & 1 deletion content/collections/docs/laravel.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You'll get a bunch of things automatically set up for you, like a pages collecti

## Supported Versions of Laravel

**Laravel 9 and Laravel 10 are supported with Statamic 4+.** If you need Laravel 8 support, you can still use Statamic 3.x.
**Laravel 10 & Laravel 11 are supported with Statamic 5.** If you need Laravel 9 support, you can still use Statamic 4.x.

## Install Statamic

Expand Down
2 changes: 2 additions & 0 deletions content/collections/docs/licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Statamic pings The Outpost (our validation web service) on a regular basis. The

This happens once per hour, and only when logged into the control panel. Changing your license key setting will trigger an immediate ping to the The Outpost. Tampering with outgoing API call will cause Statamic to consider your license invalid. If that happens, you'll need to open a [support request][support] to reinstate your license.

If you need to run Statamic in an environment without an internet connection, please [contact support](https://statamic.com/support).

## One License Per Site

Each license entitles you to run one production installation. You will need to specify the domains you plan to use from the "Sites" area of your Statamic Account. Domain are treated as wildcards so you can use subdomains for locales, testing, and other purposes.
Expand Down
Loading