Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions src/content/docs/zh-cn/reference/error-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/
- [**ForbiddenRewrite**](/zh-cn/reference/errors/forbidden-rewrite/)<br/>Forbidden rewrite to a static route.
- [**UnknownFilesystemError**](/zh-cn/reference/errors/unknown-filesystem-error/)<br/>An unknown error occurred while reading or writing files to disk.
- [**CannotExtractFontType**](/zh-cn/reference/errors/cannot-extract-font-type/)<br/>Cannot extract the font type from the given URL.
- [**CannotDetermineWeightAndStyleFromFontFile**](/zh-cn/reference/errors/cannot-determine-weight-and-style-from-font-file/)<br/>Cannot determine weight and style from font file.
- [**CannotFetchFontFile**](/zh-cn/reference/errors/cannot-fetch-font-file/)<br/>Cannot fetch the given font file.
- [**CannotLoadFontProvider**](/zh-cn/reference/errors/cannot-load-font-provider/)<br/>Cannot load font provider
- [**ExperimentalFontsNotEnabled**](/zh-cn/reference/errors/experimental-fonts-not-enabled/)<br/>Experimental fonts are not enabled
Expand Down Expand Up @@ -123,6 +124,8 @@ githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/
- [**DataCollectionEntryParseError**](/zh-cn/reference/errors/data-collection-entry-parse-error/)<br/>Data collection entry failed to parse.
- [**DuplicateContentEntrySlugError**](/zh-cn/reference/errors/duplicate-content-entry-slug-error/)<br/>Duplicate content entry slug.
- [**UnsupportedConfigTransformError**](/zh-cn/reference/errors/unsupported-config-transform-error/)<br/>Unsupported transform in content config.
- [**FileParserNotFound**](/zh-cn/reference/errors/file-parser-not-found/)<br/>File parser not found
- [**FileGlobNotSupported**](/zh-cn/reference/errors/file-glob-not-supported/)<br/>Glob patterns are not supported in the file loader

## Action 错误

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Glob patterns are not supported in the file loader
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **FileGlobNotSupported**:在 `file` 加载器中,不支持 Glob 模式导入。请使用 `glob` 加载器替代。

## 哪里出了问题?

`file` 加载器必须传入单个本地文件。其不支持 Glob 模式。使用内置的 `glob` 加载器以从多个本地文件的模式中创建条目。

**另见:**

- [Astro 内置的加载器](/zh-cn/guides/content-collections/#内置的加载器)
15 changes: 15 additions & 0 deletions src/content/docs/zh-cn/reference/errors/file-parser-not-found.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: File parser not found
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **FileParserNotFound**:未找到'&lt;文件_名称&gt;'对应的解析器(parser)。请将解析器函数(例如:`parser: csv`)传入到 `file` 加载器中。

## 哪里出了问题?

`file` 加载器无法确定需要使用哪个解析器。请提供一个自定义解析器(例如:`toml.parse` 或 `csv-parse`)用以从文件内容来创建集合。

**另见:**

- [向 `file` 加载器传入 `parser`](/zh-cn/guides/content-collections/#parser-函数)