Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uasoft-indonesia/badaso-sitemap-module
Create sitemap on badaso
https://github.com/uasoft-indonesia/badaso-sitemap-module
badaso blog cms headless laravel lowcode nocode seo sitemap xml
Last synced: about 23 hours ago
JSON representation
Create sitemap on badaso
- Host: GitHub
- URL: https://github.com/uasoft-indonesia/badaso-sitemap-module
- Owner: uasoft-indonesia
- License: mit
- Created: 2021-05-20T03:15:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T08:49:08.000Z (over 2 years ago)
- Last Synced: 2024-04-25T09:20:20.816Z (8 months ago)
- Topics: badaso, blog, cms, headless, laravel, lowcode, nocode, seo, sitemap, xml
- Language: PHP
- Homepage: https://badaso-sitemap.uatech.co.id
- Size: 878 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# badaso/sitemap-module
## Installation
1. Install Badaso from laravel project
2. Install badaso sitemap module `composer require badaso/sitemap-module`
3. Set env```
MIX_DEFAULT_MENU=admin
MIX_BADASO_MENU=${MIX_DEFAULT_MENU},sitemap-module
MIX_BADASO_PLUGINS=sitemap-module
```
4. Call command `php artisan badaso-sitemap:setup`
5. Run the laravel project and call url `http://your-laravel-host/sitemap.xml`## Configuration
file `config.php` configuration```
return [
'max_content_paginate' => 500,
'prefix' => '/',
'sitemap' => [
'badaso-blog' => [
'table' => 'posts',
'web-access' => [
'url' => env('MIX_BLOG_POST_URL_PREFIX').'/:slug',
// :slug is a field in table posts
// this url auto generate according to the number of table rows
],
],
...
],
'custom_sitemap' => [
'root' => [
'/' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
'sub-path' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
'sub-path/sub-path-other' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
...
],
...
],
];
```
Your can get foreign table attribute
```
...
'sitemap' => [
'badaso-blog' => [
'table' => 'posts',
'web-access' => [
'url' => env('MIX_BLOG_POST_URL_PREFIX').'/:posts.category_id,category.id,category.title',
// posts.category_id => foreign key posts table field category_id
// category.id => posts table category_id field reference to table category field id
// category.title => output value to path url from category table title field
// output : http://{HOST}/{MIX_BLOG_POST_URL_PREFIX}/business
],
],
...
],
...
```
You can create custom sitemap url
```
...
'custom_sitemap' => [
// group by http://{HOST}/roo/sitemap.xml
'root' => [
// http://{HOST}/root
'/' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
// http://{HOST}/sub-path
'sub-path' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
// http://{HOST}/sub-path/sub-path-othe
'sub-path/sub-path-other' => [
'lastmod' => '2021-05-24T09:32:52.785Z',
],
...
],
...
],
...
```