mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-23 19:32:14 +00:00
Updated easy-sitemap README
Signed-off-by: Florian BOUILLON <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
abd1a47a19
commit
b7a31e4b3e
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
A very easy to use sitemap generator
|
A very easy to use sitemap generator
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- Import easy-sitemap
|
- Import easy-sitemap
|
||||||
@ -30,12 +34,21 @@ const sitemap = new Sitemap('https://www.example.com', {
|
|||||||
```typescript
|
```typescript
|
||||||
sitemap.addEntry('/path')
|
sitemap.addEntry('/path')
|
||||||
|
|
||||||
// you can also add optionnal elements
|
// you can also add optional elements
|
||||||
sitemap.addEntry('/path', {
|
sitemap.addEntry('/path', {
|
||||||
// each one are optionnal and they don't all need to be added
|
// each one are optional and they don't all need to be added
|
||||||
changefreq: 'always', // webpage change freq
|
changefreq: 'always', // webpage change freq
|
||||||
lastmod: new Date('2021-01-20'), // webpage lastmod Date
|
lastmod: new Date('2021-01-20'), // webpage lastmod Date
|
||||||
priority: 1 // crawler priority
|
priority: 1, // crawler priority,
|
||||||
|
images: [{
|
||||||
|
location: '/path', // Location can be a path as well as a complete url
|
||||||
|
// Optional parameters in Image object
|
||||||
|
caption: 'Image Caption',
|
||||||
|
geoLocation: 'Image Geolocation',
|
||||||
|
title: 'Image Title',
|
||||||
|
license: 'Image License URL',
|
||||||
|
|
||||||
|
}]
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user