Hello, friends!
I have pages for different local cities, like city1.mdx, city2.mdx. And, I have the select-the-city.astro component in the header. When people click the City link, a dropdown will appear with available cities (which are just internal links to other city pages).
My question is - is there any available function to check the current page? Because as a link, I want to display the current city name. For example: Current city - Almaty (on the almaty.mdx page). On another city page, I want to display the city's name as my link.
In WordPress, I can check the current page with a PHP function like if is_page. Is there any similar function for Astro?