eleventy-plugin-syntaxhighl.../demo/test-nunjucks.njk

75 lines
1.4 KiB
Plaintext

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link rel="stylesheet" href="../test.css">
<link rel="stylesheet" href="../prism-theme.css">
</head>
<body>
{% highlight "js" %}
function myFunction() {
return true;
}
{% endhighlight %}
{% highlight "js" %}
let multilineString = `
this is the first line
this is the middle line
this is the last line
`;
{% endhighlight %}
{% highlight "js 1,3" %}
let multilineString = `
this is the first line
this is the middle line
this is the last line
`;
{% endhighlight %}
{% highlight "js 1,3" %}
alert("test");
let multilineString = buildSchema(`
this is the first line
this is the middle line
this is the last line
`);
alert("test");
{% endhighlight %}
{% highlight "js" %}
module.exports = function({collections}) {
return `<ul>
${collections.post.map((post) => `<li>${ post.data.title }</li>`).join("\n")}
</ul>`;
};
{% endhighlight %}
{% highlight "js 1,3" %}
module.exports = function({collections}) {
return `<ul>
${collections.post.map((post) => `<li>${ post.data.title }</li>`).join("\n")}
</ul>`;
};
{% endhighlight %}
{% highlight "typescript" %}
function myFunction() {
return true;
}
{% endhighlight %}
{% highlight "ts" %}
function myFunction() {
return true;
}
{% endhighlight %}
</body>
</html>