From de37e460431043efc2bcf0ac3154594feaa59bfe Mon Sep 17 00:00:00 2001 From: Nathan Upchurch Date: Tue, 9 Jul 2024 12:55:18 -0400 Subject: [PATCH] Add Cowsay --- Cowsay.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Cowsay.md diff --git a/Cowsay.md b/Cowsay.md new file mode 100644 index 0000000..66945ef --- /dev/null +++ b/Cowsay.md @@ -0,0 +1,6 @@ +You can use the `cowsay` filter to output a captioned `
` containing a copy of an output from the cowsay program. Instead of using the usual three backticks, this method is accessible to visually impaired users thanks to the automatic captioning. Here's how to do it: + +1. Add a copy of the cowsay output you'd like to display to _data/cowList.js. Be sure and escape any backslashes. +2. Use the filter like this: `{{ cowList.name | cowsay | safe }}`. + +The `safe` filter is necessary so that Eleventy doesn't sanitize our HTML. \ No newline at end of file