Skip to content

🌐 Sitemap

JetShip includes a built-in Sitemap feature, making it simple to manage which pages are included in the sitemap XML file for search engines to index. This automatic sitemap generation ensures your content remains up-to-date in search engine results.

⚙️ Sitemap Generation

The sitemap is generated automatically using the following command:

bash
php artisan app:generate-sitemap

📅 Scheduling Sitemap Generation

By default, this command is scheduled to run every 2 hours, but you can customize the frequency by editing the scheduling settings in the routes/console.php file.

📝 What is Included in the Sitemap?

The sitemap automatically includes:

  1. Blog posts.
  2. Pages tagged with the sitemapped middleware.

➕ Adding Pages to the Sitemap

To add a new page to the sitemap, simply apply the sitemapped middleware to the desired route. For example, if you want to add a custom page like /my-page to the sitemap, you can do so like this:

php
Route::get('/test', function () {
    return view('test');
})->middleware('sitemapped');

By applying the sitemapped middleware, the page will automatically be added to the sitemap XML during the next generation cycle.


With this feature, you can ensure that all important pages on your website are indexed by search engines, helping boost visibility and SEO performance. If needed, customize the sitemap generation frequency to suit your needs! 🎉