How to Make It
Combine oil and onion in a small skillet over medium-high. Cook, stirring often, until onion starts to darken around edges, about 2 minutes. Reduce heat to low and cook, stirring occasionally, until golden brown, about 5 minutes. Transfer onion to a paper-towel-lined plate and season with ¼ teaspoon salt. Transfer oil in skillet to a small heatproof bowl (adding more oil if needed to make ¼ cup). Set aside.
Cook pasta in a large pot of generously salted water according to package directions for al dente; drain, reserving 1 cup pasta water.
Combine parsley, cheese, almonds, lemon zest, lemon juice, and garlic in a food processor; pulse until finely chopped, 6 to 8 times. Add reserved onion oil, ¾ cup reserved pasta water, and remaining ¾ teaspoon salt to food processor. Process until smooth, about 30 seconds, adding more pasta water as needed to achieve desired consistency. Transfer pesto to a large bowl; add cooked pasta and toss to combine. Top with fried onions.