Skip to content

Commit 97b3969

Browse files
committed
Media settings update
1 parent 492d6df commit 97b3969

File tree

2 files changed

+52
-36
lines changed

2 files changed

+52
-36
lines changed

content/docs/dashboard/media-view.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Media view
33
slug: media-view
44
description: null
55
date: 2022-11-28T14:55:04.221Z
6-
lastmod: 2024-02-22T11:23:12.499Z
6+
lastmod: 2024-02-22T12:11:35.782Z
77
weight: 300.2
88
---
99

@@ -15,6 +15,40 @@ small images.
1515

1616
![Media dashboard][01]
1717

18+
## Define the media folder
19+
20+
You can use the `frontMatter.content.publicFolder` setting to define the location of your media
21+
files. By default, it is unset, and will show all folders and files starting from the root of your
22+
project.
23+
24+
```json {{ "title": "Example of defining the media folder" }}
25+
{
26+
"frontMatter.content.publicFolder": "public"
27+
}
28+
```
29+
30+
### Relative paths
31+
32+
In case the paths to your images need to be relative to the content file, you need to specify the
33+
following:
34+
35+
```json
36+
{
37+
"frontMatter.content.publicFolder": {
38+
"path": "src/static",
39+
"relative": true
40+
}
41+
}
42+
```
43+
44+
### Hexo support
45+
46+
In case you are using Hexo in combinations with the [asset folders](https://hexo.io/docs/asset-folders),
47+
you can use the following settings:
48+
49+
- `source/images`: If you want to use the default image location of Hexo;
50+
- `hexo:post_asset_folder`: If you want to use the post asset folder functionality.
51+
1852
## Supported files
1953

2054
By default, the media dashboard supports audio, image, and video files to be displayed and uploaded

content/docs/settings/available-settings.md

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Settings overview
33
slug: settings/overview
44
description: null
55
date: 2023-02-13T16:44:09.618Z
6-
lastmod: 2024-02-22T11:12:35.358Z
6+
lastmod: 2024-02-22T12:11:12.333Z
77
weight: 1100.2
88
---
99

@@ -146,28 +146,7 @@ folder.
146146
- Type: `string` or `object`
147147
- Default: `""`
148148

149-
### Relative image paths
150-
151-
In case the paths to your images need to be relative to the content file, you need to specify the
152-
following:
153-
154-
```json
155-
{
156-
"frontMatter.content.publicFolder": {
157-
"path": "static",
158-
"relative": true
159-
}
160-
}
161-
```
162-
163-
#### Hexo support
164-
165-
In case you are using Hexo in combinations with the
166-
[asset folders](https://hexo.io/docs/asset-folders),
167-
you can use the following settings:
168-
169-
- `source/images`: If you want to use the default image location of Hexo;
170-
- `hexo:post_asset_folder`: If you want to use the post asset folder functionality.
149+
> **Info**: More information on how to use it can be found in the [media dashboard][25] section.
171150
172151
### frontMatter.content.filters
173152

@@ -805,6 +784,20 @@ Specify the host URL of your website.
805784

806785
## Deprecated settings
807786

787+
---
788+
789+
## Removed settings
790+
791+
### frontMatter.content.folders
792+
793+
This setting has been deprecated since version `3.1.0` in favour of the newly introduced
794+
`frontMatter.content.pageFolders` setting.
795+
796+
### frontMatter.dashboard.mediaSnippet
797+
798+
This setting is deprecated in version 7.3.0 and and will be removed in the next major version.
799+
Please define your media snippet in the `frontMatter.content.snippets` setting.
800+
808801
### frontMatter.taxonomy.dateField
809802

810803
This setting is used to define the publishing date field of your articles.
@@ -823,18 +816,6 @@ This setting is used to define the modified date field of your articles.
823816

824817
> **Important**: Use the new `isModifiedDate` datetime field setting for content types instead.
825818
826-
### frontMatter.dashboard.mediaSnippet
827-
828-
This setting is deprecated in version 7.3.0 and and will be removed in the next major version.
829-
Please define your media snippet in the `frontMatter.content.snippets` setting.
830-
831-
## Removed settings
832-
833-
### frontMatter.content.folders
834-
835-
This setting has been deprecated since version `3.1.0` in favour of the newly introduced
836-
`frontMatter.content.pageFolders` setting.
837-
838819
<!-- Link References -->
839820
[01]: /docs/settings#extending-settings
840821
[02]: /docs/experimental
@@ -859,3 +840,4 @@ This setting has been deprecated since version `3.1.0` in favour of the newly in
859840
[22]: /docs/content-view#sorting
860841
[23]: /docs/content-view#filters
861842
[24]: /docs/media-view#metadata
843+
[25]: /docs/media-view#define-the-media-folder

0 commit comments

Comments
 (0)