.twig Twig template

Text & source code

MIME typetext/x-twig
DescriptionTwig template
CategoryText & source code
Based ontext/plain

Frequently asked questions

What is a .twig file?

A .twig file is a “Twig template” (MIME type text/x-twig).

How do I open a .twig file?

With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.

How can you tell a genuine .twig file?

No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.twig shows the guessed type.

Which format is .twig based on?

Technically a .twig file is a subtype of “Plain text document” (text/plain), so programs for that base format can often read it too.

Which MIME type belongs to .twig?

The MIME type is text/x-twig. In the Apache web server: AddType text/x-twig .twig; in nginx: types { text/x-twig twig; }.

Nearby entries