Make the pasta dough: Combine flour and salt in a large bowl. Make a well in the center and add the eggs and olive oil. Gradually incorporate the flour into the wet ingredients, mixing until a dough forms. Knead for 5-7 minutes until smooth and elastic. Wrap in plastic and let rest for 30 minutes at room temperature.
Prepare the filling: Heat a tablespoon of olive oil in a pan over medium heat. Add the onion and garlic, cooking until softened. Add the ground pork leg and cook until browned, about 5-7 minutes. Remove from heat and let cool. In a bowl, combine the cooked pork mixture with chopped herbs, parmesan cheese, and egg. Season with salt and pepper to taste.
Make the sauce: In a saucepan, heat olive oil over medium heat. Add onion and garlic, sautéing until soft. Add the crushed tomatoes, tomato paste, oregano, and sugar. Simmer for 15-20 minutes until slightly thickened. Season with salt and pepper.
Assemble the ravioli: Roll out the pasta dough on a floured surface until very thin. Cut into even squares (about 7cm x 7cm). Place a tablespoon of filling in the center of half the squares. Brush the edges with water and cover with another pasta square. Press firmly around the edges to seal, ensuring no air is trapped inside.
Cook the ravioli: Bring a large pot of salted water to a boil. Cook the ravioli in batches for 3-4 minutes until they float to the surface. Remove with a slotted spoon.
Serve: Plate the ravioli and top with the warm tomato sauce. Garnish with fresh basil leaves and additional grated parmesan if desired.