Home / Function/ hasUnderscoreBelowContentDirectoryPath() — astro Function Reference

hasUnderscoreBelowContentDirectoryPath() — astro Function Reference

Architecture documentation for the hasUnderscoreBelowContentDirectoryPath() function in utils.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c3eb6949_3bd8_b429_3144_2bec935dbdb8["hasUnderscoreBelowContentDirectoryPath()"]
  7a09e708_c090_71c0_8138_7343699b1865["utils.ts"]
  c3eb6949_3bd8_b429_3144_2bec935dbdb8 -->|defined in| 7a09e708_c090_71c0_8138_7343699b1865
  e9eac359_83b6_182d_4bbe_8249d11e3d5f["getEntryType()"]
  e9eac359_83b6_182d_4bbe_8249d11e3d5f -->|calls| c3eb6949_3bd8_b429_3144_2bec935dbdb8
  style c3eb6949_3bd8_b429_3144_2bec935dbdb8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/content/utils.ts lines 422–431

function hasUnderscoreBelowContentDirectoryPath(
	fileUrl: URL,
	contentDir: ContentPaths['contentDir'],
): boolean {
	const parts = fileUrl.pathname.replace(contentDir.pathname, '').split('/');
	for (const part of parts) {
		if (part.startsWith('_')) return true;
	}
	return false;
}

Subdomains

Called By

Frequently Asked Questions

What does hasUnderscoreBelowContentDirectoryPath() do?
hasUnderscoreBelowContentDirectoryPath() is a function in the astro codebase, defined in packages/astro/src/content/utils.ts.
Where is hasUnderscoreBelowContentDirectoryPath() defined?
hasUnderscoreBelowContentDirectoryPath() is defined in packages/astro/src/content/utils.ts at line 422.
What calls hasUnderscoreBelowContentDirectoryPath()?
hasUnderscoreBelowContentDirectoryPath() is called by 1 function(s): getEntryType.

Analyze Your Own Codebase

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

Try Supermodel Free