{"id":15922145,"url":"https://github.com/itstructure/yii2-sitemap-generator","last_synced_at":"2026-05-03T06:33:05.194Z","repository":{"id":56994568,"uuid":"277479898","full_name":"itstructure/yii2-sitemap-generator","owner":"itstructure","description":null,"archived":false,"fork":false,"pushed_at":"2020-07-06T08:04:39.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T13:24:05.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itstructure.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-06T08:03:26.000Z","updated_at":"2020-07-06T08:04:13.000Z","dependencies_parsed_at":"2022-08-21T13:50:34.260Z","dependency_job_id":null,"html_url":"https://github.com/itstructure/yii2-sitemap-generator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/itstructure/yii2-sitemap-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-sitemap-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-sitemap-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-sitemap-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-sitemap-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itstructure","download_url":"https://codeload.github.com/itstructure/yii2-sitemap-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itstructure%2Fyii2-sitemap-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32560423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-06T20:05:29.015Z","updated_at":"2026-05-03T06:33:05.179Z","avatar_url":"https://github.com/itstructure.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"yii2-sitemap-generator\n===================\n\nYii2 component for generation sitemap.xml\n\nIt is reworked package, based on [Dreamjobs yii2 sitemap generator](https://github.com/dreamjobs/yii2-sitemap-generator)\n\nInstallation\n------------\n\nRun command\n\n`composer require itstructure/yii2-sitemap-generator \"~1.0.0\"`\n\nConfiguration\n-------------\n\nSet in `\"./console/config/main.php\"`\n\n```php\nreturn [\n    'controllerMap' =\u003e [\n        'sitemap' =\u003e [\n            'class' =\u003e 'Itstructure\\Sitemap\\SitemapController',\n            'baseUrl' =\u003e 'https://example.com',\n            'modelsPath' =\u003e '@console/models/sitemap', // Sitemap-data models directory\n            'modelsNamespace' =\u003e 'console\\models\\sitemap', // Namespace in [[modelsPath]] files\n            'savePathAlias' =\u003e '@frontend/web', // Where would be placed the generated sitemap-files\n            'sitemapFileName' =\u003e 'sitemap.xml', // Name of main sitemap-file in [[savePathAlias]] directory\n        ],\n    ],\n];\n```\n\nSet in `\"./environments/prod/console/config/main-local.php\"`\n\n```php\n'components' =\u003e [\n    // fix console create url\n    'urlManager' =\u003e [\n        'baseUrl' =\u003e 'http://example.com',\n    ],\n],\n```\n\nSet in `\"./environments/dev/console/config/main-local.php\"`\n\n```php\n'components' =\u003e [\n    // fix console create url\n    'urlManager' =\u003e [\n        'baseUrl' =\u003e 'http://example.local',\n    ],\n],\n```\n\nRun command\n\n```code\nphp ./init\n```\n\nOR just apply same config to your \"/console/config/main-local.php\"\n\nALSO you can merge urlManager rules from frontend(or common) to console config.\nJust change \"/console/config/main.php\" file:\n\n```php\n// get config of urlManager from frontend for correctly create urls in console app\n$frontend = require(__DIR__ . '/../../frontend/config/main.php');\n$frontendUrlManager = [\n    'components' =\u003e [\n        'urlManager' =\u003e $frontend['components']['urlManager'],\n    ],\n];\n\n// ...\n\n// Merge frontend urlManager config with console application main config\nreturn yii\\helpers\\ArrayHelper::merge($frontendUrlManager, [\n    'id' =\u003e 'app-console',\n    // ...\n];\n```\n\nAlso useful append .gitignore for ignore all generated sitemaps files:\n\n```code\n# sitemaps\n/frontend/web/sitemap*.xml\n```\n\nTBD: creating sitemap-data models\n\nUsage\n-----\nRun Yii console command in project root:\n\n```code\nphp ./yii sitemap\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstructure%2Fyii2-sitemap-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitstructure%2Fyii2-sitemap-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitstructure%2Fyii2-sitemap-generator/lists"}