Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add syntax highlighting via Shiki #107

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RenderPlugin } from "@11ty/eleventy";
import fetch from "@11ty/eleventy-fetch";
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
import syntaxHighlightPlugin from "@11ty/eleventy-plugin-syntaxhighlight";
import syntaxHighlightTransform from "./src/_transforms/syntax-highlight.js";
// Import {$} from 'execa';
import newIssueUrl from "./src/_utils/new-issue-url.js";

Expand Down Expand Up @@ -42,8 +42,8 @@ export default function eleventy(eleventyConfig) {
}
});

eleventyConfig.addTransform("syntaxHighlight", syntaxHighlightTransform);
eleventyConfig.addPlugin(RenderPlugin);
eleventyConfig.addPlugin(syntaxHighlightPlugin);
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
extensions: "html",
formats: ["webp", "jpeg"],
Expand Down Expand Up @@ -87,7 +87,6 @@ export default function eleventy(eleventyConfig) {
});

eleventyConfig.addPassthroughCopy({
"node_modules/a11y-syntax-highlighting/dist/prism/a11y-dark.min.css": "assets/styles/a11y-dark.min.css",
"node_modules/@zachleat/table-saw/table-saw.js": "assets/scripts/table-saw.js"
});

Expand Down
224 changes: 200 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
"@11ty/eleventy": "^3.0.0-alpha.17",
"@11ty/eleventy-fetch": "^4.0.1",
"@11ty/eleventy-img": "^4.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"@zachleat/table-saw": "^1.0.6",
"a11y-syntax-highlighting": "^0.2.0",
"execa": "^9.3.0",
"new-github-issue-url": "^1.0.0"
"linkedom": "^0.18.4",
"new-github-issue-url": "^1.0.0",
"shiki": "^1.11.0"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/_layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Accessibility Audit for {{ title }}{% endblock %}</title>
<link rel="stylesheet" href="/assets/styles/a11y-dark.min.css">
<link rel="stylesheet" href="/assets/styles/report.css">
<link rel="stylesheet" href="/assets/styles/print.css" media="print">
<link rel="stylesheet" href="/assets/styles/screen.css" media="screen">
Expand Down
Loading