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

99 lines
1.7 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">
</head>
<body>
Just `curious` what
{% 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 %}
lineNumbers
{% highlight "ruby lines lineNumbers" %}
function myFunction() {
return true;
}
{% endhighlight %}
table
{% highlight "ruby lines table" %}
function myFunction() {
return true;
}
{% endhighlight %}
lineNumbers + table
{% highlight "ruby lines table lineNumbers" %}
function myFunction() {
return true;
}
{% endhighlight %}
</body>
</html>