To date, analytical models of internal tide generation by two-dimensional ridges have considered only idealized shapes. Here, we advance the Green function approach to address the generation of internal tides by two-dimensional topography of arbitrary shape, employing the Wentzel-Kramers-Brillouin (WKB) approximation to consider the impact of non-uniform stratifications. This allows for a more accurate analytical estimation of tidal conversion rates. Studies of single and double ridges reveal that the conversion rate and the nature of the radiated internal tide can be sensitive to the topographic shape, particularly around criticality and when there is interference between wave fields generated by neighbouring ridges. The method is then applied to the study of two important internal tide generation sites, the Hawaiian and Luzon Ridges, where it captures key features of the generation process.