First, preheat your oven to 400°F (200°C) and lightly grease a baking dish large enough to hold the cod fillets in a single layer. In a small bowl, whisk together the olive oil, fresh lemon juice, lemon zest, minced garlic, dried dill, thyme, salt, and pepper. This creates a zesty and aromatic marinade that will infuse the fish with incredible flavor.
Place the cod fillets into your prepared baking dish. Brush the marinade generously over all sides of each fillet, making sure they are well-coated. Let the fish sit and marinate for about 10 minutes. This short time is just enough for the delicate cod to absorb the bright, herby flavors without becoming mushy from the citrus.
While the cod marinates, begin the rice pilaf. Heat a drizzle of olive oil in a medium saucepan over medium heat. Add the finely chopped onion and sauté until it becomes soft and translucent. This step builds the foundational flavor of your pilaf, so don't rush it. The sweet aroma of cooking onions is the start of something delicious.
Add the long-grain rice to the saucepan with the onions. Stir constantly for about two minutes, allowing the rice grains to toast lightly. This nutty aroma is a sign you're doing it right! Pour in the chicken or vegetable broth, bring the mixture to a boil, then immediately reduce the heat to low, cover the saucepan, and let it simmer for about 15 minutes.
As the rice is simmering, place the baking dish with the marinated cod into the preheated oven. Bake for 12-15 minutes. The cooking time will depend on the thickness of your fillets. You'll know the fish is done when it is opaque all the way through and flakes easily when gently prodded with a fork.
Once cooked, remove the cod from the oven and let it rest for a few minutes. When the rice is done, turn off the heat and let it stand, covered, for 5 minutes. Fluff the rice with a fork and stir in the optional slivered almonds. To serve, plate a generous portion of the rice pilaf and top it with a beautiful lemon herb cod fillet. Garnish with fresh parsley.