Home / Function/ isMarkdownFile() — astro Function Reference

isMarkdownFile() — astro Function Reference

Architecture documentation for the isMarkdownFile() function in util.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  95f6a560_2d40_2fbd_eefa_9e06b2d9d332["isMarkdownFile()"]
  a3824e79_205c_305b_a44f_edee1ef5faa4["util.ts"]
  95f6a560_2d40_2fbd_eefa_9e06b2d9d332 -->|defined in| a3824e79_205c_305b_a44f_edee1ef5faa4
  style 95f6a560_2d40_2fbd_eefa_9e06b2d9d332 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/core/util.ts lines 22–32

export function isMarkdownFile(fileId: string, option?: { suffix?: string }): boolean {
	if (hasSpecialQueries(fileId)) {
		return false;
	}
	const id = removeQueryString(fileId);
	const _suffix = option?.suffix ?? '';
	for (let markdownFileExtension of SUPPORTED_MARKDOWN_FILE_EXTENSIONS) {
		if (id.endsWith(`${markdownFileExtension}${_suffix}`)) return true;
	}
	return false;
}

Domain

Subdomains

Frequently Asked Questions

What does isMarkdownFile() do?
isMarkdownFile() is a function in the astro codebase, defined in packages/astro/src/core/util.ts.
Where is isMarkdownFile() defined?
isMarkdownFile() is defined in packages/astro/src/core/util.ts at line 22.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free