diff options
Diffstat (limited to 'app.js')
| -rw-r--r-- | app.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -14,6 +14,7 @@ const mime = { html: 'text/html', txt: 'text/plain', css: 'text/css', + xml: 'text/xml', gif: 'image/gif', jpg: 'image/jpeg', png: 'image/png', @@ -78,7 +79,15 @@ class App { this.data = this.readfile.GetRobots() this.data.mime.then(output => this.#FileOpen({data: this.data, mime: output, res: res})) break + case 'sitemap.xml': + this.data = this.readfile.Sitemap({keys: Array.from(output.keys()), url: process.env.baseUrl}) + this.data.then(data => { + res.set('Content-Type', mime.xml) + res.send(data) + }) + break case 'rss': + res.set('Content-Type', mime.xml) rss.GetFeed({ title: process.env.rssTitle, description: process.env.rssDescription, |
