add markdown preview and improve c build