-
Notifications
You must be signed in to change notification settings - Fork 649
Deprecation: include tag
Dylan Piercey edited this page Dec 26, 2018
·
7 revisions
The <include>
tag has been deprecated in favor of using either the <${dynamic}/>
tag or a ${placeholder}
.
Here are some examples of how you can migrate your existing code:
Old:
<include('../../layouts/site-layout.marko')>
Hello World
</layout-use>
New:
import Layout from "../../layouts/site-layout.marko"
<${Layout}>
Hello World
</>
Old:
<include(input.body)/>
New:
<${input.body}/>
Old:
$ const text = "hi"
<div>
<include(text)/>
</div>
New:
$ const text = "hi"
<div>
${text}
</div>
To automatically fix deprecated marko syntax, try the marko migrate
command from the CLI.