Preheat your oven to 350 degrees F. Cut the baguette into 1/2-inch thick diagonal slices. Set aside. (see note)
Place a large skillet over medium heat and add the oil. Once hot and add the onion, salt, and sugar. Cook 20 minutes, stirring frequently, until onions are caramelized. Remove from the heat.
Arrange the baguette slices in a single layer on a baking sheet. Top each slice with a layer of goat cheese, then the apricot preserves, and finally the caramelized onions, diving the toppings evenly among the bread.
Bake for 5 minutes or until goat cheese is just melted.
Remove from the oven and garnish with fresh thyme if desired. Serve warm.
Notes
If you like, you can lightly toast the baguette slices. Brush the cut side of each bread slice with a little olive oil or butter, arrange the slices in a single layer on a baking sheet, and place under a broiler until golden. Then turn the oven to bake at 350 degrees F and continue as directed. This step is not required, but it makes the crostini even more delicious.