Melt the butter in a pot over medium-high heat, add the onions and stir for 2 minutes.
Lower the heat to medium-low and stir every 10-15 minutes until the onions are caramelized (takes about an hour, but it is totally worth it).
Add salt, pepper, thyme and your liquid of choice. Mix well, cover with a lid and cook for 20 minutes.
While the soup is cooking, heat up the oven to 400 F (200 C). Add grated mozzarella and grated parmesan on each baguette slice and bake until the cheese has melted, about 5 minutes. Drop a couple of cheesy toasts in each soup bowl.