https://github.com/phphleb/sitemapgen
Sitemap generator from framework HLEB
https://github.com/phphleb/sitemapgen
Last synced: about 1 year ago
JSON representation
Sitemap generator from framework HLEB
- Host: GitHub
- URL: https://github.com/phphleb/sitemapgen
- Owner: phphleb
- License: mit
- Archived: true
- Created: 2023-01-17T18:11:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T18:29:37.000Z (over 3 years ago)
- Last Synced: 2025-03-03T14:15:17.896Z (over 1 year ago)
- Language: PHP
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## SITEMAP Generator from HLEB framework
_Hope you don't need it_ 😀
### Installation
Step 1. Installation via Composer into an existing HLEB project:
```bash
$ composer require phphleb/sitemapgen
```
Step 2. Installing the library into the project.
```bash
$ php console phphleb/sitemapgen --add
```
```bash
$ composer dump-autoload
```
### Configuration
Step 3. Modify the configuration according to the sample `/storage/lib/sitemapgen/config.json`.
You must create classes that the handler can call on to get the data it needs.
For static (unchangeable) addresses, there is a file `/public/sitemapgen/sitemap-reserve.xml`.
You must enter this information manually.
Sample routes for generating a test sitemap:
```php
Route::get('/variant-one/preview/{url_part_1}/test/{url_part_2}/{url_part_3?}', 'view sitemap_test_1_route_name')->name('sitemap_test_1_route_name');
Route::get('/variant-two/preview/{url_part_1}/test/{url_part_2}/{url_part_3?}', 'view sitemap_test_1_route_name')->name('sitemap_test_2_route_name');
```
### Generation
Step 4. Run task:
```bash
$ php console sitemapgen/update-sitemap-task
```
-----------------------------------
[-brightgreen.svg)](https://github.com/phphleb/draft/blob/main/LICENSE)  