octoper / statamic-html-minify

5 stars 4 forks source link

XML Sitemap xmlns attribute is removed #12

Closed tisonkelley closed 2 years ago

tisonkelley commented 2 years ago

Description

Hi team, First thank you for your great add on. We are fans. Next - After weeks of help from Statamic, we have discovered that the html minify add on is stripping out attributes from the sitemap xml file on the site - And causing Google search errors. This is really bad for SEO obviously.

Here is the issue: In our sitemap here: https://muiredison.com/sitemap.xml

The urlset line should look like this:

But your add on is stripping out the namespace attribute and it looks like this: Which is giving an error in Google search console: https://www.dropbox.com/s/l5ac61i5fhyk3zz/Screen%20Shot%202022-05-23%20at%2010.26.46%20AM.png?dl=0 So my question - Is there a way to exclude xml files? Or do you know how I could fix this? Thank you for your help, Ti ### Steps to reproduce 1. View the sitemap ### Additional information * Statamic version: 3.2.18 * PHP version: 8.0 * Other addons: Listed here: https://www.dropbox.com/s/ku59m9qic70dfni/screencapture-muiredison-test-cp-addons-2022-06-10-12_37_25.png?dl=0
octoper commented 2 years ago

Hello @tisonkelley i've started making a new major version of the plugin and I'm going to release it in a few days and it will include support to exclude specific Content Types like application/xml and routes from being minified.

tisonkelley commented 2 years ago

@octoper Ok that sounds great! Can't wait. When you send that over, I'll update the statamic crew as well, so they know it's fixed

tisonkelley commented 2 years ago

@octoper Just checking in - I see that you released version 1.0.0 - I installed and I'm looking - Is there a page to set the xml file exclusion rules? Or is it done automatically? Thank you for your help

octoper commented 2 years ago

Hello! for now it does it automatically but I plan to add exclusion rules in the future.

tisonkelley commented 2 years ago

You rock thank you

On Wed, Jun 29, 2022 at 12:07 PM Vaggelis Yfantis @.***> wrote:

Hello! for now it does it automatically but I plan to add exclusion rules in the future.

— Reply to this email directly, view it on GitHub https://github.com/octoper/statamic-html-minify/issues/12#issuecomment-1170178737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVNVFUSXFQYAKN44MM4WCITVRRYCLANCNFSM5YOHNG6Q . You are receiving this because you were mentioned.Message ID: @.***>

-- Tison G. Kelley I help RIA firms achieve strategic goals through their web, digital, & human experiences. muiredison.com