![]() This requires a little bit of coding, but the example in this tutorial provides a fully functional starting point.Ĭreate a new file in the root of your theme called sitemap.hbs. The next step is to create a Handlebars template in your theme. Create a template for the Google News sitemap Save the file and upload it to Ghost Admin ( Settings → Labs → Upload routes YAML). Your routes.yaml file should now look like the file below, plus any other changes you may have made to it. This entry tells Ghost to create a route at /sitemap/, and on that route, to serve the sitemap template file and send an XML response (which is what Google News expects). Open the file in your code editor of choice. Go to Settings → Labs → Download current routes.yaml. To make your sitemap accessible on the web, add a new route using Ghost's dynamic routing layer.ĭownload the most up-to-date version of your routes.yaml file from Ghost Admin. This tutorial walks you through how to create a Google News sitemap by implementing a new route on your Ghost site and by creating a custom template that is fully optimized for the Google News aggregator. The sitemap lets Google News know all the important details about your published content. Add your content to Google News by adding a Google News sitemap to your Ghost site. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |