Skip to content

Commit beaba86

Browse files
TinaCMS content update
Co-authored-by: Caleb Williams <CalebWilliams@ssw.com.au>
1 parent 4eb1181 commit beaba86

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

content/docs/extending-tina/filename-customization.mdx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
id: /docs/extending-tina/filename-customization
33
title: Filename customization
44
alias: Any-
5-
last_edited: '2026-02-04T22:10:34.270Z'
5+
last_edited: '2026-02-04T22:11:20.220Z'
66
next: content/docs/extending-tina/before-submit.mdx
77
previous: content/docs/extending-tina/format-and-parse.mdx
88
---
99

10-
1110
By default Tina doesn't provide any opinionated file name constraints. This is because most operating systems provide a variety of file name configurations and we didn't want users to be constrained. If you need to enforce file name constraints at the collection level, Tina provides a few options for you.
1211

1312
* Please be aware of the following limitations with Tina if you do decide to do decide to implement filename customisation using any of the methods below:
@@ -31,6 +30,12 @@ By default Tina doesn't provide any opinionated file name constraints. This is b
3130

3231
The `slugify` function is useful when you want to have a file name that is *derived* from other field(s) in your collection. For example: you could have a filename that is composed from `title` and `topic` and title fields in your collection.
3332

33+
<WarningCallout
34+
body={<>
35+
The slugify function is only applies constraints when the user creates new files. Users still have complete freedom when renaming a file.
36+
</>}
37+
/>
38+
3439
### Example with slugify and read only
3540

3641
```ts
@@ -75,12 +80,6 @@ export default defineConfig({
7580
})
7681
```
7782

78-
<WarningCallout
79-
body={<>
80-
The slugify function is only applies constraints when the user creates new files. Users still have complete freedom when renaming a file.
81-
</>}
82-
/>
83-
8483
### Example with default slugify
8584

8685
If no slugify function is provided and there is a field with `isTitle: true`. A default slugify function will be used that strips out every non-alphanumeric character and replaces spaces with dashes.
@@ -117,10 +116,6 @@ export default defineConfig({
117116
})
118117
```
119118

120-
121-
Option B: using parse
122-
---------------------
119+
## Option B: using parse
123120

124121
Using the parse function you can enforce file constraints within the Tina editor. The callback function you provide will be used to sanitise the user input while they're typing. For Example: you could use
125-
126-

0 commit comments

Comments
 (0)