laravel-sitemap | Simple crawler and sitemap generator | Sitemap library
kandi X-RAY | laravel-sitemap Summary
kandi X-RAY | laravel-sitemap Summary
A simple website crawler using php-spider and SimpleXMLElement to generate a sitemap.xml-file. The file will be stored in the public/-directory. It is commonly used with the SEO-friendly CommonMark Blog Package at bring your own ideas. The sitemap generator is using the meta tag article:modified_time to identify the last modification. Noindex in robots meta-tag will be considered and the page will be left out. If a canoncial URL is set in the document, this one will be used instead. Priorities are guessed based on the depth of the page in the website.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Crawl the website .
- Write a list of resources
- Handles the site crawl .
- Register Sitemap commands .
laravel-sitemap Key Features
laravel-sitemap Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-sitemap
QUESTION
I am running two Angular2+ projects and a Laravel API on my server together. The first angular project is a public website for users (SSR enabled), the second angular project is Admin Panel (SSR not enabled), these two projects run on Laravel API. I have a strange problem with sitemap creation.
I am using this library for sitemap creation and also Laravel API is running on Apache Server.
The problem is The sitemap creation process is taking too much time (Apr. 70 seconds) This problem occurred after enabling server-side rendering on my angular project. If I disable SSR, the problem not occurs. While the angular SSR project is running based on Node.js, the sitemap creation process increases Node.js resource usage (CPU up to 85%) and therefore this process takes 1 minute to complete. This is strange because Laravel is running on the Apache server and the admin can create a sitemap, because SSR is not enabled for the admin panel, it shouldn't be related to the Node.js server.
Here is my SSR enabled angular project (when idle):
This ss taken when executing following code:
$sitemap = SitemapGenerator::create($website->url)->getSitemap();
As you can see Node process is consuming all CPU resources.
How did I understand sitemap generation is getting slow the performance?
Sitemap generation code here:
...ANSWER
Answered 2021-May-07 at 07:17From what I understand, that lib works by dynamically crawling the website. I don't know how many pages you've got, but it could take a while since the crawler will cause angular universal to render all the pages to retrieve the links.
If you disable SSR, I doubt that the sitemap will work as expected, since the crawler will not be able to retrieve page content (as without SSR, the rendered page only contains js/css links).
A solution could be to generate the sitemap yourself: add static links first, then use your api generate the lsit of dynamic pages (product/xxx
, product/yyy
)
QUESTION
I have created sitemap using this library https://github.com/spatie/laravel-sitemap but i don't want changefreq info.how to disable.can't find in repository
...ANSWER
Answered 2021-Apr-17 at 12:10Publish resource views
Then edit file: https://github1s.com/spatie/laravel-sitemap/blob/HEAD/resources/views/url.blade.php
QUESTION
I'm trying to update my Laravel version from 6 -> 8 by following this guide https://laravel.com/docs/8.x/upgrade
I'm not sure if I should update to Laravel 7 first, then to 8, never the less, I face the same composer problem when trying to update to 7.
composer update output:
...ANSWER
Answered 2020-Oct-08 at 12:38At least one of the packages you're using doesn't support Laravel 7 or 8. The composer error message tells you which one.
According to the error message, "silber/bouncer": "v1.0.0-rc.6"
only supports up to Laravel 6. Looking at the composer.json for that package shows that support for Laravel 7 wasn't added until v1.0.0-rc.7
, and support for Laravel 8 wasn't added until v1.0.0-rc.9
.
You'll need to update your silber/bouncer
dependency and then try again. If you run into another error, you'll need to look at the message to determine which package doesn't meet the requirements, and then figure out what version of that package you need to get to in order to meet the requirements.
Since Laravel 8 is fairly new, you may run into some packages that haven't been updated to support it yet (such as vimeo/laravel
). In that case, you'll either need to wait until those packages support it, or fork the package and attempt to add the support yourself.
QUESTION
I am using spatie to generate sitemap.xml. It is working properly as it is expected. But as per some requirement I would like to not include any image url in sitemap.xml.
This is my code -
...ANSWER
Answered 2020-Jun-22 at 23:50Please follow this part of document - spatie. This is not specifically omit images but if there is any specific format in your url for images link - http://www.example.com/uploads
then try to get segment(1)
and compare so this part of documentation will work.
In your case as an example -
QUESTION
I have this GenerateSitemap.php file where I can configure the crawler, but I don't understand how I should make the crawler skip some specific URLs for example (https://example.com/noindex-url). I have read this but I can't get my head around it. https://github.com/spatie/laravel-sitemap
...ANSWER
Answered 2020-May-06 at 13:48if ((string)$url->path() === '/noindex-url') {
return;
}
QUESTION
I try to move my laravel 5.8 to 7x branch. I try to move 6 branch firstly. But I got errors with maddhatter/laravel-fullcalendar, as I got error with
...ANSWER
Answered 2020-Apr-15 at 07:40the maddhatter/laravel-fullcalendar
dependency need the version 5
of illuminate/support
.
So you can't update laravel
with this dependency. Moreover, it seems that this project was not updated since 3 years
But a fork exist here.And it works with laravel
for 5,6 and 7 https://github.com/nelkasovic/laravel-full-calendar/blob/master/composer.json#L15
QUESTION
I am using phpunit 6.5.14 togehter with php-code-coverage 5.3.2
I would like to update phpunit and php-code-coverage. However, when i try to update one of them, it fails because they require each other.
For example. calling
...ANSWER
Answered 2019-Nov-16 at 09:21I recommend deleting composer.lock
and or vendor
, as Composer is not perfect in this. Often there is no conflict at all.
Then change remove both packages from
composer.json
.Then let composer re-decide the highest version possible:
QUESTION
I have a problem with installing some of the composer packages on my project.
...ANSWER
Answered 2019-Aug-05 at 16:19Not sure what would cause this except a custom version defined in your composer.json
:
QUESTION
I need to generate a sitemap.
I am using spatie/laravel-sitemap. I have installed and published it but when I run the generator Symphony throws a fatal error: Maximum execution time of 60 seconds exceeded
.
I have a huge list of links and left just one to test, but still getting the same error.
How to fix that? Here is my web.php
code:
ANSWER
Answered 2019-Jan-08 at 14:46This is a common problem when working with long running scripts.
Did you try using php function set_time_limit ?
Try putting in the beginning of your script
set_time_limit(300);
QUESTION
I want to install this package in my project https://github.com/spatie/laravel-sitemap
but the installation's failed. the error is
Anyone encountered this error. or their have other better package for laravel sitemap? any tutorial? thanks everyone :)
...ANSWER
Answered 2017-Dec-01 at 05:51The error message is pretty clear. You're trying to install spatie/laravel-sitemap:^3.3
, which requires laravel/framework:5.5
or higher. So you need to either upgrade to use Laravel 5.5, or use an older version of spatie/laravel-sitemap
.
The Github repository lists the available releases. I would suggest looking at v2.4
as a starting point, as the ChangeLog for v3.0
mentions about adding Laravel 5.5 support.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-sitemap
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page