Wash the greens thoroughly. You can spin to dry but it's not a big deal if you don't, since you may need to add water to the blender anyway.
If using stinging nettles, carrot tops, stellaria (chickweed), thick kale leaves or another robust or bitter green, you may want to blanch the greens first. Bring a pot of water to boil, throw in the greens and let them cook for 30 seconds to a minute. Pull them out and rinse with cold water to stop the cooking action. (If you plan on eating your pesto with pasta, do not drain the water - keep it to cook your pasta so you can keep some of the nutrients from the greens!)
Add all the ingredients (except the nuts - read on) to the blender or food processor and give it a good whirl. Pour the liquid at the bottom first and top with as many greens as you can fit in your machine. You may need to use a tamper or wipe the sides with a spatula a few times in the process.
I personally like to completely pulverize the greens, then add the nuts and pulse a few times to retain a bit of crunch. If you prefer the smooth consistency of a bright-green sauce, you can put all the ingredients in at the same time.
If you haven't added the nuts already, add them now.
Process to the desired consistency. If things don't blend too well, add some water, a few tablespoons at a time. (If you blanched the greens in water and reserved some, use it now.)
Taste for seasoning and adjust as desired.
Keeps in the fridge for 5 days and freezes well for a few months - but you're better off eating it sooner than later for maximum nutrition.