.ASTRO

ASTRO ファイル

Astro Website Component
質問する
クイック回答

.astroファイルは、Astroウェブフレームワークのコンポーネントテンプレートです。HTML形式のマークアップに加え、オプションでJavaScriptまたはTypeScriptのスクリプトセクションを保持し、ビルド時にAstroがこれらをプレーンなHTMLにコンパイルします。.astroファイルは任意のコードエディタで開いて編集できます。公式のAstro拡張機能を備えたVisual Studio Codeを使用すると、構文ハイライトやIntelliSenseを利用できます。Astroが最初にレンダリングを行うため、これらのファイルをブラウザで直接開くことはありません。

開発元: Astro Technology Company (Fred K. Schott); acquired by Cloudflare in January 2026 カテゴリ: インターネットファイル MIME: text/plain
対応OS Windows macOS Linux
関連: .CRDOWNLOAD · .JNLP · .WEBARCHIVE · .PART

このページの内容

19k+ 個の拡張子を索引済み
最終確認日:Aug 29, 2026

ファイルの種類がわかりませんか?

ファイルを識別ツールにドロップしてください。最初の数バイトを読み取って形式を特定します。

ファイルを識別する

ASTRO ファイル形式とは?

.astroファイルは、ブログ、ドキュメント、マーケティングページなどのコンテンツ重視のサイト向けのオープンソースウェブフレームワークであるAstroで使用されるコンポーネントです。Fred K. Schott氏が2021年にAstroを作成し、2022年8月に安定版1.0に到達しました。2026年1月にCloudflareがAstro Technology Companyを買収した後、現在はMITライセンスの下でプロジェクトが維持されています。

各ファイルは、---のコードフェンスで区切られた2つの部分で構成されています。フェンスの上部はコンポーネントスクリプト(フロントマター)で、JavaScriptまたはTypeScriptで記述されます。これはビルド時に実行され、他のコンポーネントのインポート、データの取得、変数の宣言を行います。フェンスの下部はテンプレートで、{}式、<slot />プレースホルダー、およびスコープ化された<style><script>タグを受け入れるHTMLライクなブロックです。構文は.htmlのスーパーセットであり、JSXによく似ていますが、標準的なケバブケース(kebab-case)の属性を使用します。

Astroはコンポーネントを事前にHTMLにレンダリングし、デフォルトではクライアントサイドのJavaScriptを送信しません。インタラクティブな部分は、フレームワークコンポーネントにclient:*ディレクティブを使用する「アイランドアーキテクチャ」を通じて選択的に追加されます。

セキュリティと安全性

リスク: LOW

An .astro file is human-readable source text and cannot run on its own by double-clicking. It only executes when compiled by the Astro toolchain during a build. As with any project source, its frontmatter can contain JavaScript, so review files from untrusted repositories before running npm install or a build, since build scripts and dependencies (not the .astro file itself) are the real risk.

形式の詳細

概要
正式名称Astro Website Component別名 Astro component file, Astro component
開発元Astro Technology Company (Fred K. Schott); acquired by Cloudflare in January 2026登場時期 2021
MIME タイプtext/plain
タイプText-based source file (component template)
この拡張子は以下でも使用されています…
  • ASTRO-VISION LifeSign / horoscope data - Some astrology software has used .astro for chart or profile data files. Unrelated to the web framework.
  • Generic astronomy/astrology data exports - Occasionally seen as an ad hoc extension for star-chart or ephemeris data in niche tools.

ASTRO ファイルを開くプログラム

Windows4 apps
Sublime Text フリーミアム Open the file to read and edit it as text; add an Astro syntax package for highlighting.
Visual Studio Code + Astro extension 無料 Install VS Code and the official Astro extension for syntax highlighting, IntelliSense, and formatting of .astro files.
WebStorm 有料 Open the Astro project folder; WebStorm has built-in Astro support for editing and refactoring .astro components.
Astro CLI (Node.js) オープンソース Run npm run dev or astro build to compile .astro files into HTML and preview the site.
macOS4 apps
Visual Studio Code + Astro extension 無料 Install VS Code and the official Astro extension to edit .astro files with full language support.
WebStorm 有料 Open the project and edit .astro components with built-in Astro tooling.
Zed オープンソース Open the file in Zed and install the Astro language extension for highlighting and completions.
Astro CLI (Node.js) オープンソース Use astro dev and astro build in Terminal to run and compile the project.
Linux3 apps
Visual Studio Code + Astro extension 無料 Install VS Code (or VSCodium) plus the Astro extension to edit .astro files.
Neovim + astro language server オープンソース Configure the Astro language server (@astrojs/language-server) with an LSP client for highlighting and diagnostics.
Astro CLI (Node.js) オープンソース Run npm run dev or npx astro build from the terminal to serve or compile .astro files.

技術的詳細

詳細仕様
EncodingUTF-8 plain text
Byte orderNot applicable (text)
ContainerNone; single source file
Typical sizeA few hundred bytes to tens of kilobytes
StructureTwo sections separated by a --- code fence: an optional component script (frontmatter) written in JavaScript/TypeScript that runs at build time or on the server, followed by a component template made of HTML-like markup with {} expressions, directives, <slot />, <style> and <script> tags.
IntegrityNone built in
PlatformsWindows, macOS, Linux
NotesAstro components render to HTML ahead of time and ship no client-side JavaScript runtime by default. Interactive framework components can be hydrated selectively using client:* directives (the islands architecture). The Astro compiler parses .astro files and outputs HTML plus any scoped CSS and hydration code.
Syntax BasisSuperset of HTML, close to JSX but using standard kebab-case HTML attributes
RuntimeServer/build-time rendering; no default client runtime
Language SupportJavaScript and TypeScript in the frontmatter, including top-level await
リリース日2021
最新バージョンAstro 6 (March 2026)
仕様書docs.astro.build

ASTRO の変換

コミュニティ Q&A

ユーザーからの質問
質問する
ASTRO ファイルを扱うユーザーからヘルプを得られます。OSやソフトウェアのバージョンなど、具体的に記載してください。
アカウント不要 ・ 通常1日以内に回答されます

まだ質問はありません。ASTRO ファイルについて最初の質問をしてみましょう。

よくある質問

.astroファイルはどうやって開きますか?
任意のコードエディタで開いてください。公式のAstro拡張機能を備えたVisual Studio Codeが一般的な選択肢であり、ハイライトや自動補完機能を利用できます。ファイルはプレーンテキストなので、メモ帳やTextEditでも内容を表示できます。
ブラウザで.astroファイルを表示できますか?
直接はできません。ブラウザはAstroの構文をレンダリングできません。npm run devでプロジェクトを実行するか、astro buildでビルドを行うと、AstroがコンポーネントをHTMLに変換し、それをブラウザが表示できるようになります。
.astroファイルを作成するプログラムは何ですか?
開発者がAstroプロジェクトの一部として、コードエディタで手動作成します。Astro CLIを使用すると、サンプルの.astroファイルが含まれたスタータープロジェクトを生成できます。
.astroファイルはHTMLと同じですか?
いいえ。HTMLのスーパーセットであり、JavaScript/TypeScriptのフロントマターセクションとテンプレート式が追加されています。Astroはビルド中にこれを標準のHTMLにコンパイルします。
なぜ.astroファイルの先頭にJavaScriptがあるのですか?
2つの---行に挟まれたその上部セクションは、コンポーネントスクリプトまたはフロントマターと呼ばれます。これはビルド時に実行され、コンポーネントのインポート、データの取得、下のテンプレートで使用する変数の設定を行います。
.astro形式は安全に開けますか?
はい。ファイルは読み取り可能なテキストであり、開いただけでは実行されません。信頼できないプロジェクトから依存関係をインストールしたりビルドしたりする前に、通常の注意を払うだけで十分です。

参考文献

1Astro Docs - Componentsdocs.astro.build
2Astro Docs - Template expressions referencedocs.astro.build

さらに探索

データベース全体から

今週のトップ拡張子

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.PARTPartial Download File
4.MDMarkdown Document
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

関連する拡張子

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

無料ファイルツール

ブラウザで動作するファイル識別および画像変換ツール。すべてお使いのデバイス上で実行されます。

ツールボックスを開く

ファイル拡張子を A-Z で閲覧