new-window links in md and footer

This commit is contained in:
Joshua Seigler 2025-05-29 15:10:03 -04:00
parent ed91d1c76d
commit 699feac2f2
5 changed files with 21 additions and 3 deletions

View file

@ -3,6 +3,7 @@ import path from "path";
import md from "markdown-it";
import mdAnchor from "markdown-it-anchor";
import mdFootnote from "markdown-it-footnote";
import mdLinkAttributes from "markdown-it-link-attributes";
import prettier from "prettier";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc.js";
@ -27,7 +28,16 @@ export default (config) => {
symbol: "",
}),
})
.use(mdFootnote);
.use(mdFootnote)
.use(mdLinkAttributes, {
matcher(href) {
return href.match(/^https?:\/\//);
},
attrs: {
target: "_blank",
rel: "noopener",
},
});
config.setLibrary("md", mdLib);
config.addPassthroughCopy({
assets: "/",

7
package-lock.json generated
View file

@ -15,6 +15,7 @@
"eleventy-plugin-clean": "^2.0.1",
"markdown-it-anchor": "^9.0.1",
"markdown-it-footnote": "^4.0.0",
"markdown-it-link-attributes": "^4.0.1",
"prettier": "^3.3.1"
}
},
@ -1563,6 +1564,12 @@
"integrity": "sha512-WYJ7urf+khJYl3DqofQpYfEYkZKbmXmwxQV8c8mO/hGIhgZ1wOe7R4HLFNwqx7TjILbnC98fuyeSsin19JdFcQ==",
"license": "MIT"
},
"node_modules/markdown-it-link-attributes": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/markdown-it-link-attributes/-/markdown-it-link-attributes-4.0.1.tgz",
"integrity": "sha512-pg5OK0jPLg62H4k7M9mRJLT61gUp9nvG0XveKYHMOOluASo9OEF13WlXrpAp2aj35LbedAy3QOCgQCw0tkLKAQ==",
"license": "MIT"
},
"node_modules/markdown-it/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",

View file

@ -18,6 +18,7 @@
"eleventy-plugin-clean": "^2.0.1",
"markdown-it-anchor": "^9.0.1",
"markdown-it-footnote": "^4.0.0",
"markdown-it-link-attributes": "^4.0.1",
"prettier": "^3.3.1"
}
}

View file

@ -1,7 +1,7 @@
<footer>
&copy; Joshua Seigler 2025.
-
<a href="https://github.com/seigler" rel="me">GitHub</a>
<a href="https://github.com/seigler" rel="me noopener" target="_blank">GitHub</a>
-
<a href="/feed.xml">RSS</a>
-

View file

@ -23,7 +23,7 @@ These stories contain so much richness. One theme that stuck with me emerges in
### [![book cover, a tromp-l'oeil torn segment reveals in bold letters "SELF-DECEPTION"](/books/1523006560.jpg) Leadership and Self-Deception <small>- The Arbinger Institute</small>](https://amzn.to/3GNsFGs)
This book painted for me a vivid picture of the mechanics of selfish and self-centered thinking. It describes in detail the ways that we blind ourselves, especially in interpersonal communication. The result of internalizing the concepts in this book is a sort of secular elaboration of "Love your neighbor", but even though it misses (or omits? subtracts?) the spiritual core of things, it still rings quite true and the tools found in this book and others from the Arbinger Instutute are fantastically valuable.
If this is of interest, you may also enjoy Marshall Rosenberg's "Non-violent communication"
If this is of interest, you may also enjoy [Marshall Rosenberg's "Non-violent communication"](https://amzn.to/3SmSQqi) or [my article on needs-based communication](/posts/needs-based-communication/).
### [![book cover, a byzantine icon "The triumph of the Archangel Michael over the antichrist, who is shown falling into the abyss together with the cities of this world at the end of time"](/books/188790400X.jpg) Orthodoxy and the Religion of the Future <small>- Fr. Seraphim Rose</small>](https://amzn.to/4jVqE9F)