#different file type

3 messages · Page 1 of 1 (latest)

civic vessel
#

Can Astro be configured to output a different file type such as .aspx?

hushed saddleBOT
#

Hi @civic vessel. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Astro does not directly support outputting to .aspx or other non-HTML file types. By default, Astro renders your project code to HTML for display on the web. This is because most of the processing in Astro occurs on the server, making your site or app faster than client-side rendering when viewed on less-powerful devices or on slower internet connections.

However, Astro does support most static assets with zero configuration required. You can use the import statement anywhere in your project JavaScript (including your Astro frontmatter) and Astro will include a built, optimized copy of that static asset in your final build. The supported file types include Astro Components (.astro), Markdown (.md, .markdown, etc.), JavaScript (.js, .mjs), TypeScript (.ts, .tsx), NPM Packages, JSON (.json), JSX (.jsx, .tsx), CSS (.css), CSS Modules (.module.css), and Images & Assets (.svg, .jpg, .png, etc.) source (https://docs.astro.build/en/guides/imports#_top).

For any other static assets, you can place them in the public/ directory of your project, and Astro will copy it directly into your final build untouched. public/ files are not built or bundled by Astro, which means that any type of file is supported. You can reference a public/ file by a URL path directly in your HTML templates source (https://docs.astro.build/en/guides/imports#_top).

If you need to generate .aspx files or any other specific file types not supported by Astro, you might need to use a different tool or build process that supports that file type.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: