Skip to content

E0715: A Layout type wraps no folder ​

In vuka 1 a folder declaring type Layout struct wrapped the pages below it. A folder's layout is its _layout.vuka.html now, the struct it declares (or, beside its markup alone, a Layout declared in Go). A Layout in a folder without one wraps nothing, so it is this error, at the type; a 1.x layout.vuka.html beside it is renamed _layout.vuka.html.

Wrong ​

go
// pages/layout.go
package pages

type Layout struct {
	Children ui.Node
}

func (l Layout) Render(ctx context.Context, w io.Writer) error { … }
html
<!-- pages/_layout.vuka.html -->
<script lang="go">
package pages

import "github.com/vuka-lang/ui/v2"

type Layout struct {
	Children ui.Node
}
</script>

<html lang="en">
<body><main>{Children}</main></body>
</html>

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.