-
Notifications
You must be signed in to change notification settings - Fork 664
Deprecation: include tag
Taylor Hunt edited this page Aug 2, 2019
·
7 revisions
The <include> tag is deprecated in favor of either <${dynamic}/> tagnames or dynamic text ${placeholders}.
<include('../../layouts/site-layout.marko')>
Hello World
</include>…now uses the import statement and a dynamic tagname:
import Layout from "../../layouts/site-layout.marko"
<${Layout}>
Hello World
</><include('../../layouts/site-layout.marko', input)>
Hello World
</include>import Layout from "../../layouts/site-layout.marko"
<${Layout} ...input>
Hello World
</><include(input.body)/>This is now replaced completely by dynamic tagnames:
<${input.body}/>$ const text = "hi"
<p>
<include(text)/>
</p>This is now replaced entirely by dynamic text placeholders:
$ const text = "hi"
<p>
${text}
</p>To automatically fix deprecated marko syntax, try the marko migrate command from the CLI.