Until the 16th century, Indonesia was 100% Hindu-Buddhist(except the negligible elite of Kedah sultanate).
Today, Hindus and Buddhists are not even 1%. Muslims are 88%. What led to such a drastic change? Expect for a handful of people on Bali Island, Hinduism in Indonesia is extinct.
The Mosque shown in this picture is known as Menara Kudus mosque. Built in 1549, it is the earliest surviving mosque of Indonesia. It is a Dargah of a Sufi wali-Sanga (saint) known as Sunan kudus. The Dargah tells us a lot about how Sufi Islam spread in Indonesia. It is built by tearing down a Hindu temple. The temple remains can still be clearly seen.
There is an interesting story. When temples were destroyed to make way for mosques, Hindus did not enter the mosques. Sunan Kudus tied a cow inside the mosque and began chanting Surah Al Baqara (the cow) of the Quran. To attract Hindus, he forbade the slaughter of cows. This rule is followed by Kudus until today. This was the conversion data model followed by the early Sufis of Indonesia. While ruthlessly demolishing temples, they also appropriated some cultural aspects like veneration of the cow for the smooth religious transition of converts.