Wash the Swiss chard and remove the stems. Chop the leaves into small pieces. If you want to use the stems, finely chop them and set aside.
Heat 3 tablespoons olive oil in a large pot over medium-high heat. Once hot, add the chopped onions, garlic, ginger, and chili if using. Cook until everything is softened and beginning to brown. Add the spices and stir frequently while cooking for another two minutes. If using the Swiss chard stems, add now and cook an additional five minutes. Add the Swiss chard leaves and stir well. Cook a few minutes more until the greens just barely begin to wilt. Strain everything in a colander to remove excess liquid. Allow to cool.
Prepare a large working space: you’ll need your phyllo dough, melted butter, olive oil, baking sheets, a pastry brush and a damp towel.
Mix the 1/4 cup olive oil into the melted butter. Lay the phyllo dough out flat.
Using the pastry brush, gently butter the center 1/3 of filo dough (lengthwise, from top to bottom). Once the center 1/3 is buttered, fold the right 1/3 of the filo dough over and place it on top of the center 1/3. Then butter that 1/3 section that you just folded. Repeat the process again, now folding the left 1/3 of the filo dough onto the center 1/3. And lightly butter again. (The butter helps the dough stick together.)
You should now have a long, thin strip of filo dough in front of you. At the top of the filo strip place a scoop of the Swiss chard mixture, (approx 2-3 Tablespoons.) Take the upper right corner of the filo strip and fold it in a diagonal direction over top of the Swiss chard mix, so that it ends up forming a perfect triangle. Once that first triangle is formed, continue folding this triangle down the filo strip, in the same style that a military flag is folded, maintaining the perfect triangle shape.
To get a sense of this folding process, go to the 1-minute mark of this video. (In this video, the chef places his “mix” on the phyllo dough before doing the 1/3 fold, whereas we added our Swiss chard “mix”.)