You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2021/05/19 01:43:37 UTC
[incubator-annotator-website] 02/03: Add syntax highlight plugin
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-annotator-website.git
commit 75c92c9aacb2a0c3cbc7cdc44a5e9146aaee5c8f
Author: Randall Leeds <ra...@bleeds.info>
AuthorDate: Sun May 16 15:32:18 2021 -0700
Add syntax highlight plugin
---
.eleventy.js | 3 +++
src/_layouts/default.hbs | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/.eleventy.js b/.eleventy.js
index d31afc8..102a06a 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -30,6 +30,9 @@ module.exports = function(eleventyConfig) {
const pluginTOC = require('eleventy-plugin-toc');
eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3'] });
+ const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
+ eleventyConfig.addPlugin(pluginSyntaxHighlight);
+
return {
dir: {
input: 'src',
diff --git a/src/_layouts/default.hbs b/src/_layouts/default.hbs
index 8fff6dd..0ce12fe 100644
--- a/src/_layouts/default.hbs
+++ b/src/_layouts/default.hbs
@@ -34,10 +34,15 @@
{{/extra_head_stuff}}
<link rel="stylesheet" href="//semantic-ui.com/dist/semantic.min.css" />
+ <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prism-themes/themes/prism-vs.css" />
<style>
html {
font-size: 17px;
}
+
+ p, pre[class*="language-"] {
+ margin: .8em 0 1.25em;
+ }
</style>
</head>