jwz: Now I have two problems (Mastodon PHP comments)
Lazyweb, why doesn't this regexp match in Perl 5.32.1, 5.34.3 or 5.18.2 but does in PHP and JS: perl -le 'print 0 + ("ABCDE" =~ m/ABCF|BCDE|C(G)/);' Changing nearly any character, including the C before the G, or removing the parens, makes it match.
Learn Eleventy
The best way to learn Eleventy is to build something with it.
This course was originally authored by Andy Bell and hosted at learneleventyfromscratch.com. This fork is now maintained by uncenter.
Welcome to Eleventy Notes
A simple, lightweight, and flexible note-taking template for Eleventy.
Welcome to Eleventy Notes, an opinionated template for publishing your personal notes, documentation, or even your blog! Built with Eleventy, the powerful static site generator, Eleventy Notes is packed with features you'll love.
11ty Slugs and Anchors | 11ty Rocks!
Enable anchor links on content headings
There are several plugins you can add to extend markdown-it, but in this example we are adding anchor links to our content headings. We're also extending the idea from our slug update to update which characters are removed and replaced to create anchors.
Using shiki with 11ty
Since my last post about shiki was really long and described a really deep way on how to use and modify shiki, this is the complete opposite. This shows just short and simple how to use shiki in your eleventy (11ty) project.
Lesson 18-20: Transform gulp pipeline to use ESM (to fix issue with `gulp-imagemin`) · Issue #40 · Andy-set-studio/learneleventyfromscratch.com · GitHub
gulp-imagemin in its latest version is now ESM only (see also #24 ). In my personal project I have changed the gulp pipeline to use ESM and was able to update all dependencies to their latest versions. I want to leave my code here for an...
Eleventy plugin for generating social images (using SVG) | Notes | Kumar Abhishek
How I created an eleventy plugin to automatically generate social-images for your website and blog posts.
Possible to use VS Code debugger? · Issue #331 · 11ty/eleventy · GitHub
What I want to do is console.log variables when I create shortcodes. Template fills up the console too much, so it's hard to debug. Wondering whether it's possible to debug with VS code built in debugger. If yes, what's the configuration...
Compiling CSS with Eleventy
A list of different options for compiling CSS with Eleventy
David Darnes came at me with a classic RTFM. Turns out Eleventy has a page on the docs for doing exactly this. This method uses Sass and requires a little bit of config. One thing to note is by default this will output all .scss file to the built site, so I added a check to see if the file is named app and if it's not, then skip it. Alternatively you can put your files in an _includes directory and these won't be output (thanks Dave). style: 'compressed' will minimise the CSS.
Stephanie Eckles has an Eleventy plugin for using LightningCSS which handles all the configuration and as a bonus ignores any files that start with _ so they won't get copied to the build folder.
Sympolymathesy, by Chris Krycho
Learning in public: on theology, technology, ethics, software, politics, art, and more.
Add HTML classes to 11ty markdown content - DEV Community
11ty comes with some useful plugins for markdown manipulation, one of these is... Tagged with 11ty, eleventy.
GitHub - josephdyer/skeleventy: A skeleton boilerplate built with Eleventy.
A skeleton boilerplate built with Eleventy. Contribute to josephdyer/skeleventy development by creating an account on GitHub.
Micro @eleven_ty tip:
We can use the Nunjucks "dump" filter to call "JSON.stringify" on an object and "dump" the result(s) into our template.
For example, we can render information about our current page with the Eleventy supplied "page" variable.
Minimum Static Site Setup with Sass | Stephanie Eckles
If you don't need any templating languages and just need to get a simple site built plus Sass, use this as the contents of a fresh package.json:
npm start - copies src files to public and starts Browsersync server at localhost:3000
npm run build - copies files to public and autoprefixes/minifies css
David East - 11ty tips I wish I knew from the start
- Get comfortable with 11ty’s configuration
- Set a source folder and an output folder
- Configure markdown for Nunjucks syntax
- Supercharge markdown with containers and classes
- Embrace the Data Cascade
- Async shortcodes are for dynamic data fetching
- Use Eleventy Navigation
Javascript Data Files and You by Bryan Robinson [ Jamstack Toronto ] - YouTube
A talk by Bryan Robinson during 11ties: a series of 11 min lightning talks on 11ty, recorded on 11/11, 2020 -- for Jamstack TORONTO.
A Complete Guide to Building a Blog with Eleventy
Let's begin by first describing exactly what we're building. I think most developers have a good idea of what a blog is, but every blog is different. For this guide, I will support the following features:
- A home page that displays the last ten blog articles, newest on top. For each blog post, we display the title, date published, and an excerpt of the post.
- A page that displays the blog post. This will have the title, published date, a list of categories assigned to the post, and the contents of the post itself.
- Every blog post will have one or more categories assigned to it. Each category will have its own index page with a list of blog posts assigned to it. Each item in the list will have the title and date of the post, nothing more.
- An author page, basically, who is doing the writing?
- An archives page that lists every single blog post. This will use Eleventy's pagination system.
- A set of category archive pages. The same idea as the main archives page, but unique per category.
- A RSS feed.
Tutorials—Eleventy, a simpler static site generator.
Tutorials—Eleventy, a simpler static site generator.
Build an 11ty Site in 3 Minutes
In just 3 minutes, get an overview of the essential features available when building a site with 11ty.