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

build(deps-dev): bump @11ty/eleventy from 2.0.1 to 3.0.0 #788

Merged
merged 4 commits into from
Nov 15, 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
27 changes: 7 additions & 20 deletions .config/eleventy.cjs → .config/eleventy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { IdAttributePlugin } from "@11ty/eleventy";
import syntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight';
import markdownIt from 'markdown-it';
import csp_plugin from './eleventy.csp.cjs';


module.exports = function(eleventyConfig) {
export default function(eleventyConfig) {
// Aliases are in relation to the _includes folder
eleventyConfig.addLayoutAlias('about', 'layouts/about.html');
eleventyConfig.addPassthroughCopy({'doc_src/css':'css'});
Expand All @@ -10,7 +13,6 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy({'dist/esm':'esm'});

// content security policy
const csp_plugin = require('./eleventy.csp.cjs');
eleventyConfig.addPlugin(csp_plugin,{
csp:{
'default-src': ["'self'"],
Expand All @@ -23,23 +25,9 @@ module.exports = function(eleventyConfig) {
});

// header anchors
const anchors_plugin = require('@orchidjs/eleventy-plugin-ids');
eleventyConfig.addPlugin(anchors_plugin,{
prefix:'',
selectors:[
'.container h1',
'.container h2',
'.container h3',
'.container h4',
'.container h5',
'.container h6',
'.container td:first-child',
]
});

eleventyConfig.addPlugin(IdAttributePlugin);
Copy link
Contributor

@nwalters512 nwalters512 Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't support nested selectors like .container td:first-child. In my opinion that's a reasonable tradeoff to significantly reduce the number of dependencies used here (one fewer copy of JSDOM!).


// syntax highlighting
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
eleventyConfig.addPlugin(syntaxHighlight);

function GlobCollection(name, glob){
Expand Down Expand Up @@ -81,8 +69,7 @@ module.exports = function(eleventyConfig) {



let markdownIt = require('markdown-it');
md = markdownIt({
const md = markdownIt({
html: true,
breaks: false,
//linkify: true
Expand Down
2 changes: 1 addition & 1 deletion Gruntfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ module.exports = function(grunt) {
// generate /build-docs
shell: {
builddocs: {
command: 'npx @11ty/eleventy --config=.config/eleventy.cjs',
command: 'npx @11ty/eleventy --config=.config/eleventy.js',
},
rollupdocs: {
command: 'npx rollup -c .config/rollup.docs.mjs',
Expand Down
2 changes: 1 addition & 1 deletion doc_src/pages/examples/styling.njk
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ new TomSelect('#input-group-first',{create:true});
{% endset %}
</script>

{{ demo_col('input-group', left_col, html, script) }}
{{ demo_col('input-group-first', left_col, html, script) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new IdAttributePlugin discovered that this produced a duplicate ID. I updated the name to match that in the script above.

Loading