Posts about JavaScript
Implementing a light/dark mode toggle with pure JS/CSS
Coding Jan 4, 2022
Learn how to implement a minimal light/dark mode toggle in Eleventy with pure JavaScript and CSS.
- Eleventy
- JavaScript
Identifying bad code with function usage patterns
Coding Jan 13, 2022
Learn how to look at the call patterns of functions to identify code smells and refactor bad Java, TypeScript and JavaScript code.
- JavaScript
Resolve a list of promises synchronously
Coding Apr 15, 2022
Learn how to execute and resolve a list of JavaScript promises synchronously instead of in parallel with Promise.all.
- Node.js
- TypeScript
- JavaScript
Custom-themed Mermaid diagrams in Eleventy
Coding Jun 3, 2022
Learn how to use Mermaid diagrams embedded in your Markdown files in Eleventy. Globally define a custom theme that is used in each diagram.
- Eleventy
- JavaScript
Rendering a file structure with Prism in Eleventy
Coding Jun 15, 2022
Learn how to display a file system structure nicely on your Eleventy website with Prism.
- Eleventy
- JavaScript
Injecting an HTML snippet into every 11ty post
Coding Jul 21, 2022
Learn how to inject a rendered Nunjucks template into every post of your Eleventy blog.
- Eleventy
- JavaScript