Jump to content

Recommended Posts

What do you think about making the module extensible via hooks?

I had a client request a sitemap that included videos. Now, methods of storing videos differ: file fields, video URLs, embed codes, and so on. I suspect there's no straightforward way to include videos in the sitemap using just this module.

However, implementing this on a site-by-site basis would become simple if there was a way to hook into the sitemap creation process and append different definitions like video or news item yourself.

Of course, I could create the whole sitemap from scratch — but your module does a lot of things very well and I'd love to build upon that.

Share this post


Link to post
Share on other sites

Thanx for your module - MarkupSitemap, v. 0.4.1. Works perfect (PW 3.0.123)!
What about adding 'x-default', a reserved hreflang attribute, when no languages match? recommended by Google & Yandex.

 "Use the x-default tag for unmatched languages. The reserved value hreflang="x-default" is used when no other language/region matches the user's browser setting.
This value is optional, but recommended, as a way for you to control the page when no languages match."
,
google.com/webmasters/answer/189077#sitemap | webmasters.googleblog.com/.../x-default-hreflang-for-international-pages.html

<xhtml:link rel="alternate" hreflang="x-default" href="...URI-to-default-language..." />

Something like this:

hreflang-x-default.png.990282f0039da0baa083a1cb7fe86841.png

 

  • Like 1

Share this post


Link to post
Share on other sites

Google Search Console talk: "Sitemap file is in HTML format" 😭

Share this post


Link to post
Share on other sites

Hey @Mike Rockett,

Any chance you could add this module to Packagist?

Would love to use it on my current project, but I'm relying on Composer. Would be nice not to have to install this module via Git or add the repository manually to composer.json. It would also be awesome if you could declare type as pw-module and add wireframe-framework/processwire-composer-installer as a dependency for easy installing.

Thanks for considering! 👌🙂

  • Like 3

Share this post


Link to post
Share on other sites

I just installed this module as an upgrade to the Markup Sitemap XML module and I really like it, thank you!

Unfortunately, I found that adding the "license" field to a image using ImageExtra doesn't display the license despite using a valid URL: https://creativecommons.org/licenses/by-nc-nd/4.0/

Share this post


Link to post
Share on other sites

Hey @teppo - sorry for the delayed reply here. This can definitely be done. Good work with the composer installer - haven't been around for a while now, so didn't see it pop up. 🙂

Hey @Lance O. - You're very welcome - glad you like the module! 🙂 I don't think your issue is related to the URL validator, as the filter does say that URL is valid, as expected. This leads me to think that it's a spelling issue with the field name, though that seems unlikely. Would you mind doing a little debugging and checking to see if the URL does indeed get knocked out at https://gitlab.com/rockettpw/seo/markup-sitemap/blob/master/MarkupSitemap.module.php#L447?

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, Mike Rockett said:

The module has been published to Packagist, under rockett/sitemap. 🙂

Awesome, thanks Mike! 🙂

 

Share this post


Link to post
Share on other sites

@Mike Rockett

Sure, let me know exactly what you need me to do. Here is the field settings as copied from phpMyAdmin, in case there is something incorrect there:

{"description":"The Open Graph Image is used when sharing the page to social media services like Facebook and Twitter. Upload images that are **1200 x 630 pixels** for the best display on high resolution devices. At minimum, use images that are **600 x 315 pixels**. Be sure to include a description to be used as the alt tag.","textformatters":["TextformatterEntities","TextformatterStripTags"],"extensions":"jpg jpeg png","maxFiles":1,"outputFormat":0,"defaultValuePage":0,"useTags":0,"inputfieldClass":"InputfieldImage","collapsed":2,"descriptionRows":1,"gridMode":"list","focusMode":"on","resizeServer":0,"clientQuality":90,"overwrite":1,"maxWidth":1200,"minWidth":600,"minHeight":315,"tags":"meta images","icon":"tag","fileSchema":6,"otherField":"License","otherFieldSettings":"{\"cf_textformatter\":{\"license\":\"\"},\"cf_label\":{\"cf_label__license\":\"\"}}"}

Share this post


Link to post
Share on other sites

@Lance O.

Looks like it could well be a case sensitivity issue with the license field, where yours is using an upper case "L", it is actually expecting it in lowercase. Are you able to rename the field and try again? Whether or not that fixes it, I'll need to push an update that converts the casing appropriately.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By stanoliver
      My aim is to output a very basic xml document which should be styled with a few css-styles.
      <?xml version = "1.0"?> <contact-info> <name>Donal Duck</name> <company>Superducks</company> <phone>(011) 123-4567</phone> </contact-info> How do I implement it with processwire?
    • By franciccio-ITALIANO
      Hi, we can choose the "headline" and "title" and "summery" in panel page of processwire, but we can't write the "metadecriptions" and "tags".
       I can write mdescropt and tags in templates, but I've same templates for many articles... so, how I can change mdescription and tags?

      Thanks...
    • By Leftfield
      Hi All 🙂

      How to append canonical URL to head from certain templates?

      Thanks!!!
    • By Marco Angeli
      Hi there,
      I added a ssl certificate to my site and I'd like to redirect every single http url to its new https version
      So I added this code in the .htacces file, after the RewriteEngine On :
      Redirect 301 /about https://www.mysite.it/about
      Unfortunately this is now working: I get the "too many redirects" error.
      The following code works, but it's a bulk redirection to the home page, something I don't want for SEO reasons (https://moz.com/blog/save-your-website-with-redirects😞
      RewriteCond %{HTTP_HOST} mysite\.it [NC]
      RewriteCond %{SERVER_PORT} 80
      RewriteRule ^(.*)$ https://www.mysite.it/$1 [R,L]
      Any suggestions?
    • By gebeer
      Hi,
      just wanted to share something I came across while working on an import module for XML data from a web service. The XML I got was not huge, but still, loading around 3.5 MB of XML with 250+ large child nodes into memory at once with simplexml_load_file() and then looping over it had significant impact on performance.
      I searched for a solution and found this great article about how to parse large XML files.
      It basically explains how to utilize the native XMLReader class together with SimpleXMLElement to handle such situations in a memory efficient way.
      After implementing it I got a significant improval on perceived performance. No comparison in numbers to share here as I'm a bit short on time.
×
×
  • Create New...