01 - Set oven to 400°F and line a baking tray with parchment paper.
02 - Heat olive oil in a skillet over medium heat. Sauté chopped onion for 3 minutes until softened, then add garlic and cook for an additional minute.
03 - Add fresh spinach to the skillet and cook until wilted, about 2 minutes. Remove from heat and allow to cool slightly.
04 - In a bowl, mix the cooled spinach mixture with crumbled feta, chopped dill or parsley, and the whole egg. Season with salt and black pepper.
05 - Roll out the puff pastry on a lightly floured surface and cut into 8 equal squares.
06 - Place a heaping tablespoon of the filling in the center of each square.
07 - Fold each square into a triangle or rectangle and press edges firmly to seal. Use a fork to crimp the edges.
08 - Whisk egg yolk with water and brush over the pastries. Optionally, sprinkle with sesame or nigella seeds.
09 - Bake in the preheated oven for 20 to 25 minutes, until golden and puffed.
10 - Allow pastries to cool slightly before serving warm or at room temperature.