{"id":20109303,"url":"https://github.com/fuelviews/laravel-sitemap","last_synced_at":"2025-05-06T10:31:12.513Z","repository":{"id":225364303,"uuid":"765784739","full_name":"fuelviews/laravel-sitemap","owner":"fuelviews","description":"Laravel sitemap package","archived":false,"fork":false,"pushed_at":"2025-05-06T01:35:03.000Z","size":284,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-06T02:32:39.315Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fuelviews.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Fuelviews"}},"created_at":"2024-03-01T15:59:15.000Z","updated_at":"2025-04-24T20:42:14.000Z","dependencies_parsed_at":"2024-03-20T18:48:45.832Z","dependency_job_id":"f51df12f-de0d-40db-9601-e4187002179e","html_url":"https://github.com/fuelviews/laravel-sitemap","commit_stats":null,"previous_names":["fuelviews/laravel-sitemap"],"tags_count":17,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelviews%2Flaravel-sitemap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelviews%2Flaravel-sitemap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelviews%2Flaravel-sitemap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fuelviews%2Flaravel-sitemap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fuelviews","download_url":"https://codeload.github.com/fuelviews/laravel-sitemap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252611051,"owners_count":21776100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuelviews","google","laravel","laravel-sitemap","php","seo","sitemap","xml"],"created_at":"2024-11-13T18:07:50.015Z","updated_at":"2025-05-06T10:31:12.081Z","avatar_url":"https://github.com/fuelviews.png","language":"PHP","funding_links":["https://github.com/sponsors/Fuelviews"],"categories":[],"sub_categories":[],"readme":"# Laravel sitemap package\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/fuelviews/laravel-sitemap.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-sitemap)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-sitemap/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/fuelviews/laravel-sitemap/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-sitemap/fix-php-code-style-issues.yml?label=code%20style\u0026style=flat-square)](https://github.com/fuelviews/laravel-sitemap/actions?query=workflow%3A\"Fix+PHP+code+style+issues\")\n[![Total Downloads](https://img.shields.io/packagist/dt/fuelviews/laravel-sitemap.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-sitemap)\n\nLaravel sitemap is a robust and easy-to-use solution designed to automatically generate sitemaps for your Laravel application.\n\n## Installation\n\nYou can require the package and it's dependencies via composer:\n\n```bash\ncomposer require fuelviews/laravel-sitemap\n```\n\nYou can manually publish the config file with:\n\n```bash\nphp artisan vendor:publish --provider=\"Fuelviews\\Sitemap\\SitemapServiceProvider\" --tag=\"sitemap-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /**\n     * Specifies the default filesystem disk that should be used.\n     * The 'public_path' disk is typically used for files that need to be publicly accessible to users.\n     * This setting can influence where files, such as generated sitemaps, are stored by default.\n     */\n    'disk' =\u003e 'public',\n\n    /**\n     * Determines whether the index page should be excluded from the sitemap.\n     * Setting this to `true` will exclude the index page, `false` will include it.\n     */\n    'exclude_subcategory_sitemap_links' =\u003e true,\n\n    /**\n     * Controls whether redirect URLs should be excluded from the sitemap.\n     * When set to `true`, all redirects are excluded to ensure the sitemap only contains direct links.\n     */\n    'exclude_redirects' =\u003e true,\n\n    /**\n     * An array of route names to be excluded from the sitemap.\n     * Useful for excluding specific pages that should not be discoverable via search engines.\n     */\n    'exclude_route_names' =\u003e [\n    ],\n\n    /**\n     * Specifies paths that should be excluded from the sitemap.\n     * Any routes starting with these paths will not be included in the sitemap, enhancing control over the sitemap contents.\n     */\n    'exclude_paths' =\u003e [\n    ],\n\n    /**\n     * An array of full URLs to be excluded from the sitemap.\n     * This allows for fine-grained exclusion of specific pages, such as sitemap files or any other URLs not suitable for search engine indexing.\n     */\n    'exclude_urls' =\u003e [\n        '/sitemap.xml',\n        '/pages_sitemap.xml',\n        '/posts_sitemap.xml',\n    ],\n\n    /**\n     * Specifies the model class to be used for fetching posts to be included in the sitemap.\n     * This setting allows for customization of the source of content, enabling the sitemap to reflect the structure and content of your website accurately.\n     * The specified model should implement any necessary logic to retrieve only the posts that should be visible to search engines.\n     */\n    'post_model' =\u003e [\n        //App\\Models\\Post::class,\n    ],\n];\n```\n\n## Usage\n\nYou can also add your models directly by implementing the Spatie\\Sitemap\\Contracts\\Sitemapable interface. You also need to define your post_model in the fv-sitemap.php config file.\n\n```php\nnamespace App\\Models;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse App\\Contracts\\Sitemapable;\nuse Spatie\\Sitemap\\Tags\\Url;\n\nclass Post extends Model implements Sitemapable {\n    /**\n     * Convert the Post model instance into a sitemap URL entry.\n     *\n     * @return \\Spatie\\Sitemap\\Tags\\Url\n     */\n    public function toSitemapUrl() {\n        $url = Url::create(url(\"{$this-\u003eid}\"))\n            -\u003esetLastModificationDate($this-\u003eupdated_at)\n            -\u003esetChangeFrequency('daily')\n            -\u003esetPriority(0.8);\n\n        return $url;\n    }\n}\n```\n\nYou can generate the sitemap with:\n\n```bash\nphp artisan sitemap:generate\n```\n\nYou can link to the sitemap with:\n\n```blade\nroute('sitemap', ['filename' =\u003e 'sitemap.xml'])\n```\n\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/fuelviews/.github/blob/main/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nIf you've found a bug regarding security please mail [support@fuelviews.com](mailto:support@fuelviews.com) instead of using the issue tracker.\n\n## Credits\n\n- [Thejmitchener](https://github.com/thejmitchener)\n- [Fuelviews](https://github.com/fuelviews)\n- [Spatie](https://github.com/spatie)\n- [All Contributors](../../contributors)\n\n## Support us\n\nFuelviews is a web development agency based in Portland, Maine. You'll find an overview of all our projects [on our website](https://fuelviews.com).\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuelviews%2Flaravel-sitemap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuelviews%2Flaravel-sitemap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuelviews%2Flaravel-sitemap/lists"}