Wanze Posted April 13, 2020 Author Share Posted April 13, 2020 On 4/5/2020 at 2:09 PM, HerTha said: Hi @Wanze thanks for this fantastic module! Is there a way to control how the module's XML sitemap generator handles hidden pages? Hi @HerTha, What kind of control do you need exactly? Hidden pages are not excluded from the sitemap by default. Currently, you can either include/exclude hidden pages via SeoMaestro field. Or you can use the following hook to alter sitemap items programatically: https://github.com/wanze/SeoMaestro#___sitemapitems Cheers 1 Link to comment Share on other sites More sharing options...
B3ta Posted April 13, 2020 Share Posted April 13, 2020 Hi @Wanze, I would also like to know if there is any way to improve the way the sitemap gets generated and the way the frontend its affected in the process. My website have a few thousands of pages and growing rapidly. with a really powerful server, and constant changes , the sitemap refreshes every hour. 1. Do you think you can build the sitemap.xml in a less resource intensive way? 2. For bigger websites with more than 50k pages probably websites will need a sitemapindex and a way to keep the sitemap in this limits. According to a quick google search the Sitemaps should be no larger than 50MB (52,428,800 bytes) and can contain a maximum of 50,000 URLs. Thanks! 1 Link to comment Share on other sites More sharing options...
HerTha Posted April 13, 2020 Share Posted April 13, 2020 3 hours ago, Wanze said: What kind of control do you need exactly? I'd like to exclude all hidden pages - except for a few specific ones (manually selected). Is there a way how this could be established? Link to comment Share on other sites More sharing options...
HerTha Posted April 13, 2020 Share Posted April 13, 2020 3 hours ago, B3ta said: websites with more than 50k pages wow, what is that? ? Link to comment Share on other sites More sharing options...
B3ta Posted April 13, 2020 Share Posted April 13, 2020 1 minute ago, HerTha said: wow, what is that? ? It's a classifieds website. Link to comment Share on other sites More sharing options...
HerTha Posted April 13, 2020 Share Posted April 13, 2020 2 minutes ago, B3ta said: It's a classifieds website. I guess I need to grow up before taking on such tasks! ? Link to comment Share on other sites More sharing options...
Wanze Posted April 14, 2020 Author Share Posted April 14, 2020 18 hours ago, B3ta said: Hi @Wanze, I would also like to know if there is any way to improve the way the sitemap gets generated and the way the frontend its affected in the process. My website have a few thousands of pages and growing rapidly. with a really powerful server, and constant changes , the sitemap refreshes every hour. 1. Do you think you can build the sitemap.xml in a less resource intensive way? 2. For bigger websites with more than 50k pages probably websites will need a sitemapindex and a way to keep the sitemap in this limits. According to a quick google search the Sitemaps should be no larger than 50MB (52,428,800 bytes) and can contain a maximum of 50,000 URLs. Thanks! Hi @B3ta, The sitemap generation should not affect your frontend; the sitemap should only be generated on requests where a user is logged into the admin: https://github.com/wanze/SeoMaestro/blob/master/SeoMaestro.module.php#L154 1. If the performance is a problem on sites with a large amount of pages, I suggest to disable the automatic generation and to create the sitemap manually via cronjobs. You'd need a CLI script that bootstraps ProcessWire and then executes $wire->module('SeoMaestro')->getSitemapManager()->generate(). 2. I would be happy to support multiple sitemaps, but I do not have any time/capacity at the moment, nor am I working with ProcessWire anymore. If anyone would like to contribute this, please send a pull request! Cheers Link to comment Share on other sites More sharing options...
Wanze Posted April 14, 2020 Author Share Posted April 14, 2020 15 hours ago, HerTha said: I'd like to exclude all hidden pages - except for a few specific ones (manually selected). Is there a way how this could be established? You have the following possibilities: Manually include/exclude all pages via SeoMaestro field Setup the default value on template level to not include pages in the sitemap, and then manually include them via SeoMaestro field. Or vice versa, whatever makes more sense ? If you know how to use hooks: Exclude the hidden pages by using the hook mentioned in my first answer Cheers 1 Link to comment Share on other sites More sharing options...
HerTha Posted April 15, 2020 Share Posted April 15, 2020 Okay, I understand there is no simple toggle/option to exclude/include hidden files, so I will have a closer look at hooks then. Thank you so much for the time you are dedicating to maintain this module and to answering (my) questions! 1 Link to comment Share on other sites More sharing options...
Wanze Posted April 15, 2020 Author Share Posted April 15, 2020 5 hours ago, HerTha said: Okay, I understand there is no simple toggle/option to exclude/include hidden files, so I will have a closer look at hooks then. Thank you so much for the time you are dedicating to maintain this module and to answering (my) questions! You're welcome! ?Let me know if you need any help in implementing a solution using hooks. Maybe the following examples from the tests could be useful : https://github.com/wanze/SeoMaestro/blob/master/tests/src/SitemapManagerTest.php#L177-L220 Cheers 1 1 Link to comment Share on other sites More sharing options...
3fingers Posted April 15, 2020 Share Posted April 15, 2020 Quote ...nor am I working with ProcessWire anymore. [Litte OT] @Wanze Out of curiosity, has something changed in your development arsenal? ? 4 Link to comment Share on other sites More sharing options...
csaggo.com Posted May 8, 2020 Share Posted May 8, 2020 Hello @Wanze thanks for the great Plugin. I am Using a template with segments. Im able to overwrite the canonical url just like i needed. But in og:url i cannot overwrite when i try it like this: page()->seo->og->url = $canonical; am i doing something wrong? the url field seemingly is not part of the changeable fields but just generated. i think in this case canonical should be used when it is overwritten (like in this case i overwrite canonical before og:url thank you for your feedback ? Link to comment Share on other sites More sharing options...
Wanze Posted May 9, 2020 Author Share Posted May 9, 2020 On 4/15/2020 at 2:31 PM, 3fingers said: [Litte OT] @Wanze Out of curiosity, has something changed in your development arsenal? ? Hi @3fingers Yes and no ? I used ProcessWire for some projects as freelancer, but never at my "daily" work. I still believe that ProcessWire is a great open source software and I'm maintaining a couple of private projects. But in my opinion, ProcessWire lacks of some important features (testing, config management, migration handling, command line tools, extensible frontend etc.) and also it is not easy to setup if multiple people are working on the same project. Nowadays I am writing Flutter apps and Javascript. But of course I still come back here to give some support and to see how ProcessWire evolves! ? Cheers 1 Link to comment Share on other sites More sharing options...
Wanze Posted May 9, 2020 Author Share Posted May 9, 2020 On 5/8/2020 at 1:44 PM, csaggo.com said: Hello @Wanze thanks for the great Plugin. I am Using a template with segments. Im able to overwrite the canonical url just like i needed. But in og:url i cannot overwrite when i try it like this: page()->seo->og->url = $canonical; am i doing something wrong? the url field seemingly is not part of the changeable fields but just generated. i think in this case canonical should be used when it is overwritten (like in this case i overwrite canonical before og:url thank you for your feedback ? Hi @csaggo.com It seems like there is no url field for opengraph tags. At the moment, the og url is generated dynamically based on the page's httpUrl, so you cannot change it at runtime. If the module would use the canonical url at render time, it should work. Can you open an issue on GitHub? ? Cheers 1 Link to comment Share on other sites More sharing options...
kongondo Posted May 10, 2020 Share Posted May 10, 2020 (edited) 10 hours ago, Wanze said: Flutter apps Great! This is where I make noise about Flutter. Would be nice to hear you talk about your experiences there ? Edited May 10, 2020 by kongondo 1 Link to comment Share on other sites More sharing options...
iNoize Posted May 14, 2020 Share Posted May 14, 2020 Hello, i tried to install this module. (currently MarkupSeo in USE) created a TV called $seom applied to home template and basci page to test. Maybe how to define the meta tags values ? Can i use the current tags from MarkupSeo or for example i want to use the summary as description. in the sitemap i see only one entry with the home template. The basic pages are not shown. Have I to set something specially ? Thanks Link to comment Share on other sites More sharing options...
uiui Posted May 17, 2020 Share Posted May 17, 2020 I'd need to change the base url for the alternate link meta tags. Is it true that you can neither work with different domains for multiple languages nor deactivate that functionality to do it yourself? Link to comment Share on other sites More sharing options...
Greg Lumley Posted May 17, 2020 Share Posted May 17, 2020 Hi, I'm getting apostrophe's being rendered as HTML in the Maestro Output. What is the best recommended way to fix this? <meta name="description" content="Greg's wedding photography is fun, creative and natural. Capturing moments when know he's there. He makes you feel comfortable and his enthusiasm is infectious."> Thank you. Link to comment Share on other sites More sharing options...
uiui Posted May 18, 2020 Share Posted May 18, 2020 On 5/17/2020 at 2:51 PM, uiui said: I'd need to change the base url for the alternate link meta tags. Is it true that you can neither work with different domains for multiple languages nor deactivate that functionality to do it yourself? To anyone else who runs into this issue: I solved it with a hook like this: $wire->addHookAfter('SeoMaestro::renderMetatags', function (HookEvent $event) { $tags = $event->arguments(0); $group = $event->arguments(1); if ($group === null) { foreach(wire("languages") as $lang) { $code = $lang->name;//$lang->isDefault() ? $defaultLang : $lang->name; $tags["link_rel_{$code}"] = preg_replace("/domain.tld/", $lang->domain, $tags["link_rel_{$code}"]); } $event->return = $tags; } }); $lang->domain stores the domain used for a language. 1 Link to comment Share on other sites More sharing options...
uiui Posted May 20, 2020 Share Posted May 20, 2020 I want to replace domain names in my sitemap of a multi-language, multi-domain site. I tried registering a hook in _init.php but it seems like this is not how to do this. Where do I need to register a hook for SeoMaestro::sitemapItems? Edit: I eventually solved this issue. As the sitemap is only created when requesting an admin page, the webhook needs to be registered in admin.php. $wire->addHookAfter('SeoMaestro::sitemapItems', function (HookEvent $event) { $sitemapItems = $event->arguments(0); foreach($sitemapItems as $item) { $alternates = $item->get('alternates'); foreach(wire("languages") as $lang) { $code = $lang->name; if($alternates[$code]) { $alternates[$code] = preg_replace("/(?:local\.)domain\.tld/", $lang->domain, $alternates[$code]); } } $item->set('alternates', $alternates); } $event->return = $sitemapItems; }); The domain for each language is stored in $lang->domain. Link to comment Share on other sites More sharing options...
iNoize Posted June 4, 2020 Share Posted June 4, 2020 Hello, some of my sites have the Image TV called {images} and some {immo_images} if i try to define the basic value like {images} {immo_images} it doesnt work. for images. For descriprion is no problem but how i can solve this for images in open graph ? Thanks. Link to comment Share on other sites More sharing options...
Wanze Posted June 12, 2020 Author Share Posted June 12, 2020 On 6/4/2020 at 5:49 AM, iNoize said: Hello, some of my sites have the Image TV called {images} and some {immo_images} if i try to define the basic value like {images} {immo_images} it doesnt work. for images. For descriprion is no problem but how i can solve this for images in open graph ? Thanks. Hi @iNoize It should work, here's a quote from the readme: Quote The opengraph image tag supports placeholders as well: Simply reference an image field. If the field is holding multiple images, the first one is used. For example, {images} would pick the first image from the images field. However, you can only use one field as placeholder for the Opengraph image, so either {images} or {immo_images}. Hope that helps! Cheers Link to comment Share on other sites More sharing options...
iNoize Posted June 12, 2020 Share Posted June 12, 2020 46 minutes ago, Wanze said: Hi @iNoize It should work, here's a quote from the readme: However, you can only use one field as placeholder for the Opengraph image, so either {images} or {immo_images}. Hope that helps! Cheers OK thanks, it means I have to set manually for each document where the images fiels is called immo_images. This Module don't check also for the TV value. Example if images is empty use the next one placeholder from main config Link to comment Share on other sites More sharing options...
Wanze Posted June 17, 2020 Author Share Posted June 17, 2020 On 6/12/2020 at 9:26 PM, iNoize said: OK thanks, it means I have to set manually for each document where the images fiels is called immo_images. This Module don't check also for the TV value. Example if images is empty use the next one placeholder from main config You can setup the default values for each template and pages using that template will inherit the configured placeholder by default, unless overridden on page-level. For your second question: No, there is no such fallback implemented. You would need to programmatically add that logic yourself by using hooks. Link to comment Share on other sites More sharing options...
iNoize Posted June 19, 2020 Share Posted June 19, 2020 Hello, how to set the values to "Inherit defaukt value" via API ? With some tests i have now the Title is empty in the $page->seom->title. e.G. here https://prnt.sc/t2r1vr I have something like this. $seom is my SeoMaestro TV $seiten = $pages->find("template=basic-page, include=hidden"); foreach ($seiten as $p) { $p->of(false); if ($p->seo_title != '') { $p->seom->meta->title = $p->seo_title; }else { $p->seom->meta->title = $p->title; } $pages->save($p); } but it does not work for me. I need to set it to default Value if its possible ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now