Closed JvanderCeelen closed 3 years ago
This is a useful addition. I made some minor comments against lines of code, plus:
image
property of the sitemap entry object. It seems you are right to remove it, since it does not appear to be used.ignore
property. I wonder if images could work in a similar fashion, with the option to exclude images is available in images' YAML metafiles. (Perhaps for images, they should be excluded by default with an option to include??). This is more coding, but removes the scenario where a developer of a site with many significant images (to be included in the sitemap) needs to enumerate them all in sitemap.yaml
. Not sure I explained that very wellhey Hugh, thanks for the comments. I will start changing stuff when I have the time for it. Hopefully somewhere this week.
Hi Hugh, I made some minor changes to the code. On your first point, I haven't removed the image property from the sitemap entry object, but renamed it to images, plural. I mentioned it in the description. Is that satisfactory?
On your second point, I think I get what you mean, but I'm not sure if it's a good idea. The way I thought about this, is to pick up every image defined in the frontmatter of a page and put them in the sitemap. But I'm not sure people would want that. It could be an equal amount of trouble to get all image which aren't important removed from the sitemap by hand as putting the important ones in. I'm not a SEO guy, so I don't know if it's commen practice to add images in the sitemap or not. Do you have any idea? I could ask our external SEO guy, but I'll wait with that until I have an answer from you.
On your third point, I will update the readme as the added functionality is now and adjust it if we change someting afterwards.
Added readme and license tag.
Due to conflicts, i had to merge this in manually.. Also made some minor changes. Thanks.
Changed the placeholder for image to plural, in our case we needed multiple images on a page to show up in the sitemaps. With some help in the grav discord I created the url for the image:/user/pages//. This worked for our images. Not sure if this goes for everyone though.
You need to use...
...in the frontmatter. Not sure if this is clear for everybody. Should I adjust the readme to point this out? I'm not a backender, so not really up to snuff with best practices. Please let me know if I need to adjust something.