-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: generate sitemap.xml and robots.txt (#8028)
* docs: generate sitemap.xml and robots.txt * docs: verify ownership for google search console * Update Robots.txt
- Loading branch information
1 parent
749e14e
commit 758967c
Showing
7 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/playground/build-scripts-storybook/sitemap-prepare.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import * as fs from 'fs'; | ||
import * as xmlbuilder from 'xmlbuilder'; | ||
|
||
console.log('Generating sitemap.xml for playground...'); | ||
const data = require('../dist/playground/stories.json'); | ||
|
||
let xml = xmlbuilder.create('urlset', { version: '1.0', encoding: 'UTF-8' }); | ||
xml.att('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9'); | ||
|
||
for (let key in data.stories) { | ||
const kind = data.stories[key]?.kind?.split('/')[0]?.toLowerCase(); | ||
xml.ele('url') | ||
.ele('loc', {}, `https://sap.github.io/ui5-webcomponents/playground/?path=/${kind}/${key}`) | ||
.up() | ||
.ele('changefreq', {}, 'monthly'); | ||
} | ||
|
||
let xmlString = xml.end({ pretty: true }); | ||
fs.writeFileSync('./dist/playground/sitemap.xml', xmlString); | ||
console.log('sitemap.xml generated successfully!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
<title>UI5 Web Components</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="./assets/css/landing-page.css"> | ||
<meta name="google-site-verification" content="HDR-jetpFv0oB3i-RQthjtTSdPuN7DMINyPk3oA7pYg" /> | ||
<meta name="keywords" content="ui5-webcomponents,ui5 webcomponents,ui5 web components,webcomponents,web components,ui5,api,docs,documentation,sample,usage,examples,demo,Fiori 3,react,angular,vue"> | ||
<link type="image/x-icon" href="./assets/images/favicon.ico" rel="shortcut icon"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.css"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
User-agent: Googlebot | ||
Disallow: /nogooglebot/ | ||
|
||
User-agent: * | ||
Allow: / | ||
|
||
Sitemap: https://sap.github.io/ui5-webcomponents/playground/sitemap.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters