is there any way to generate toc ( Table of contents) in a wiki page

Hi,

is there any way to generate toc ( Table of contents) in  a wiki page based on the headings , similar to that of {toc} macro in confluence