Layouts

Layouts are components which are wrapped around pages located in their respective folders and subfolders.

A typical layout can look like this.

<!-- _layout.svelte --> <slot> <!-- pages in this folder and subfolders will be rendered here --> </slot> <p>Copyright my website 2020</p>
<!-- _layout.svelte -->

<slot>
  <!-- pages in this folder and subfolders
   will be rendered here -->
</slot>
<p>Copyright my website 2020</p>

Layouts are recursive, so whenever a page is displayed all layouts from all its parent folders are applied.

Layouts must always have a <slot> tag.


Writing good documentation that is up-to-date is difficult. If you notice a mistake, help us out.