Skip to content
Playground(another site)

bynk.embed.outside_embeds_dir

Error An embed names a file outside the project's embeds/ folder.

An embed is compiled into the deployed code, so it may come only from the project's embeds/ folder. If any path were allowed, a declaration could pull .env or a source file into the bundle just by naming it. Move the file into embeds/ and name it there. A path that is empty, absolute or contains .. is bynk.embed.unsafe_path instead.

Example

embed shell = "templates/page.html" // ✗ not in the embeds/ folder
embed shell = "embeds/page.html" // ✓

In the Book

See also

  • Every code in its category, Embedded text, on the diagnostic index.
  • bynk explain bynk.embed.outside_embeds_dir shows the same from the installed toolchain, without a network.