Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d314782

Browse files
authored
Merge branch '11ty:main' into patch-1
2 parents f47cdb2 + bddb6c9 commit d314782

32 files changed

+283
-162
lines changed

config/activity.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { ActivityFeed } from "@11ty/eleventy-activity-feed";
55
export default async function () {
66
let feed = new ActivityFeed();
77

8+
// feed.importer.setVerbose(true);
9+
810
feed.setCacheDuration("1d"); // note that cache is persisted on CI server
911

1012
// The Eleventy Activity Feed
@@ -15,8 +17,8 @@ export default async function () {
1517
"Quick Tips",
1618
"https://www.11ty.dev/docs/quicktips/feed.xml"
1719
);
18-
feed.addSource("rss", "Mastodon", "https://fosstodon.org/users/eleventy.rss");
19-
// feed.addSource("twitterUser", "Twitter", "eleven_ty", "949639269433380864");
20+
feed.addSource("fediverse", "Mastodon", "@eleventy@fosstodon.org");
21+
feed.addSource("bluesky", "Bluesky", "@11ty.dev");
2022

2123
if (process.env.NODE_ENV === "production") {
2224
// Warning: at time of writing Eleventy has 51 repos, beware if this grows beyond the max of 100

config/markdownPlugin.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import slugify from "slugify";
2-
import markdownIt from "markdown-it";
32
import markdownItToc from "markdown-it-table-of-contents";
43
import { IdAttributePlugin } from "@11ty/eleventy";
5-
import { decodeHTML } from "entities";
64

75
function markdownItSlugify(s) {
86
return slugify(removeExtraText(s), { lower: true, remove: /[\=\":'`,]/g });
@@ -27,17 +25,15 @@ export default function (eleventyConfig) {
2725
eleventyConfig.addPlugin(IdAttributePlugin, {
2826
// custom slugify function, otherwise we use Eleventy’s built-in `slugify` filter.
2927
slugify: function(textContent) {
30-
// TODO Eleventy 3.0.0-beta.2 will handle decodeHTML automatically
31-
return markdownItSlugify(decodeHTML(textContent));
28+
return markdownItSlugify(textContent);
3229
},
3330
selector: "h1,h2,h3,h4,h5,h6", // default
3431
});
3532

36-
let mdIt = markdownIt({
37-
html: true,
38-
breaks: true,
39-
linkify: true,
40-
}).use(markdownItToc, {
33+
let mdIt;
34+
eleventyConfig.amendLibrary("md", (mdLib) => {
35+
mdIt = mdLib;
36+
mdLib.use(markdownItToc, {
4137
includeLevel: [2, 3],
4238
slugify: markdownItSlugify,
4339
format: function (heading) {
@@ -52,10 +48,9 @@ export default function (eleventyConfig) {
5248
},
5349
});
5450

55-
// opt out of linkification for .io TLD, e.g. 11ty.io
56-
mdIt.linkify.tlds(".io", false);
57-
58-
eleventyConfig.setLibrary("md", mdIt);
51+
// opt out of linkification for .io TLD, e.g. 11ty.io
52+
mdLib.linkify.tlds(".io", false);
53+
});
5954

6055
eleventyConfig.addPairedShortcode("markdown", function (content) {
6156
return mdIt.renderInline(content);

eleventy.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@ function findBy(data, path, value) {
268268
export default async function (eleventyConfig) {
269269
eleventyConfig.setServerPassthroughCopyBehavior("passthrough");
270270

271+
272+
if (process.env.NODE_ENV === "production") {
273+
eleventyConfig.setConcurrency(1);
274+
}
275+
271276
if (process.env.NODE_ENV === "production") {
272277
// Skip on production
273278
eleventyConfig.ignores.add("src/admin.md");

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
]
4242
},
4343
"devDependencies": {
44-
"@11ty/eleventy": "^3.0.0",
45-
"@11ty/eleventy-activity-feed": "^1.0.9",
46-
"@11ty/eleventy-fetch": "^5.0.0-beta.3",
44+
"@11ty/eleventy": "3.0.1-alpha.1",
45+
"@11ty/eleventy-activity-feed": "^2.0.0",
46+
"@11ty/eleventy-fetch": "^5.0.1",
4747
"@11ty/eleventy-img": "^5.0.0",
4848
"@11ty/eleventy-navigation": "^0.3.5",
4949
"@11ty/eleventy-plugin-rss": "^2.0.2",
@@ -62,10 +62,8 @@
6262
"human-readable-numbers": "0.9.5",
6363
"lodash": "^4.17.21",
6464
"luxon": "^3.4.0",
65-
"markdown-it": "^13.0.1",
6665
"markdown-it-table-of-contents": "^0.6.0",
6766
"memoize": "^10.0.0",
68-
"node-fetch": "^2.6.8",
6967
"node-retrieve-globals": "^2.0.6",
7068
"pagefind": "^1.1.1",
7169
"prettier": "^2.8.4",

src/_includes/components/docs-toc.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="elv-toc" data-pagefind-ignore>
22
{%- set calloutTitle %}<a href="/blog/">Blog</a>{% endset %}
33
{%- callout "", "html", calloutTitle %}
4-
<a href="/blog/eleventy-font-awesome/" class="elv-toc-callout-link"><strong>11ty is joining <span class="nowrap">Font Awesome{% indieavatar "https://fontawesome.com/", "avatar-right" %}</span></strong></a>
4+
<a href="/blog/survey-awesome/" class="elv-toc-callout-link">Help Eleventy: Fill out <strong><span class="nowrap">Survey Awesome</span></strong>!</a>
55
{%- endcallout %}
66

77
{%- set versionsTitle = "<a href='/docs/versions/'>Versions</a>" %}
@@ -10,9 +10,9 @@
1010
<dt>Stable</dt>
1111
<dd><code>{{ npmVersions.latest }}</code></dd>
1212
{# <dt>Beta</dt>
13-
<dd><code>{{ npmVersions.beta }}</code></dd>
13+
<dd><code>{{ npmVersions.beta }}</code></dd> #}
1414
<dt>Canary</dt>
15-
<dd><code>{{ npmVersions.canary }}</code></dd> #}
15+
<dd><code>{{ npmVersions.canary }}</code></dd>
1616
</dl>
1717
{%- endcallout %}
1818

src/_includes/components/external-links.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ a[href^="https://fediverse.zachleat.com"]:not(.elv-externalexempt):before,
3737
a[href^="https://fosstodon.org"]:not(.elv-externalexempt):before,
3838
a[href^="https://wikipedia.org"]:not(.elv-externalexempt):before,
3939
a[href^="/blog/discord/"]:not(.elv-externalexempt):before,
40-
a[href^="https://en.wikipedia.org"]:not(.elv-externalexempt):before {
40+
a[href^="https://en.wikipedia.org"]:not(.elv-externalexempt):before,
41+
a[href^="https://bsky.app"]:not(.elv-externalexempt):before {
4142
content: "";
4243
display: inline-block;
4344
vertical-align: text-bottom;
@@ -53,6 +54,7 @@ a[href^="https://github.com"]:not(.elv-externalexempt):after,
5354
a[href^="https://gitlab.com"]:not(.elv-externalexempt):after,
5455
a[href^="https://fediverse.zachleat.com"]:not(.elv-externalexempt):after,
5556
a[href^="https://fosstodon.org"]:not(.elv-externalexempt):after,
57+
a[href^="https://bsky.app"]:not(.elv-externalexempt):after,
5658
a[href^="https://wikipedia.org"]:not(.elv-externalexempt):after,
5759
a[href^="/blog/discord/"]:not(.elv-externalexempt):after,
5860
a[href^="https://en.wikipedia.org"]:not(.elv-externalexempt):after {
@@ -71,6 +73,10 @@ a[href^="https://fosstodon.org"]:before {
7173
border-radius: 0.3125em; /* 5px /16 */
7274
background-image: url("https://v1.indieweb-avatar.11ty.dev/https%3A%2F%2Ffosstodon.org%2F/");
7375
}
76+
a[href^="https://bsky.app"]:before {
77+
border-radius: 0.3125em; /* 5px /16 */
78+
background-image: url("https://v1.indieweb-avatar.11ty.dev/https%3A%2F%2Fbsky.app%2F/");
79+
}
7480
a[href^="https://github.com"]:before {
7581
border-radius: 7px;
7682
box-shadow: 0px 0px 0px 2px #fff;

src/_includes/components/lists.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ h2 .numberflag,
255255
h3 .numberflag,
256256
h4 .numberflag,
257257
h5 .numberflag {
258-
width: 1.25em;
259-
height: 1.25em;
258+
width: 1.4em;
259+
height: 1.4em;
260260
}
261261
h2 .numberflag {
262262
position: relative;

src/_includes/components/logo-cloud.webc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<li><img webc:is="indieweb-avatar" url="https://www.w3.org/">W3C</li>
77
<li><img webc:is="indieweb-avatar" url="https://about.google/">Google</li>
88
<li><img webc:is="indieweb-avatar" url="https://www.mozilla.org/">Mozilla</li>
9-
<li><img webc:is="indieweb-avatar" url="https://www.cloudcannon.com/">CloudCannon</li>
109
<li><img webc:is="indieweb-avatar" url="https://www.jetbrains.com/">JetBrains</li>
1110
<li>
1211
<html-fetch src="/imports/logo-cloud.html" target="li" replace></html-fetch>

src/_includes/header.njk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<li><a href="https://github.com/11ty/eleventy/" class="naked elv-nav-sociallink elv-skipicon">GitHub</a></li>
3535
{%- if github.stargazers %}<li class="elv-nav-menu-hidesmall"><a href="https://github.com/11ty/eleventy" class="minilink minilink-github elv-skipicon"><span>★</span> <strong title="{{ github.stargazers }}">{{ github.stargazers | humanReadableNum }}</strong></a></li>{% endif %}
3636
<li><a href="https://fosstodon.org/@eleventy" class="naked elv-nav-sociallink elv-nav-light"><span class="elv-nav-sociallink-text">Mastodon</span></a></li>
37+
<li><a href="https://bsky.app/profile/11ty.dev" class="naked elv-nav-sociallink elv-nav-light"><span class="elv-nav-sociallink-text">Bluesky</span></a></li>
3738
<li><a href="https://www.youtube.com/c/EleventyVideo" class="naked elv-nav-sociallink elv-nav-light"><span class="elv-nav-sociallink-text">YouTube</span></a></li>
3839
<li><a href="/blog/discord/" class="naked elv-nav-sociallink elv-nav-light"><span class="elv-nav-sociallink-text">Discord</span></a></li>
3940
</ul>

src/_includes/snippets/plugins/idattr-opts.njk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export default function (eleventyConfig) {
1515
// swaps html entities (like &amp;) to their counterparts before slugify-ing
1616
decodeEntities: true,
1717

18+
// check for duplicate `id` attributes in application code?
19+
checkDuplicates: "error", // `false` to disable
20+
1821
// by default we use Eleventy’s built-in `slugify` filter:
1922
slugify: eleventyConfig.getFilter("slugify"),
2023

@@ -42,6 +45,9 @@ module.exports = async function (eleventyConfig) {
4245
// swaps html entities (like &amp;) to their counterparts before slugify-ing
4346
decodeEntities: true,
4447

48+
// check for duplicate `id` attributes in application code?
49+
checkDuplicates: "error", // `false` to disable
50+
4551
// by default we use Eleventy’s built-in `slugify` filter:
4652
slugify: eleventyConfig.getFilter("slugify"),
4753

0 commit comments

Comments
 (0)