Skip to content

Commit

Permalink
docs: add sitemap.xml and robots.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
dohooo committed Oct 12, 2024
1 parent 6c101f7 commit a3a98fb
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 12 deletions.
6 changes: 6 additions & 0 deletions example/website/next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || "https://rn-carousel.dev",
generateRobotsTxt: true,
exclude: ["*/_meta"],
};
3 changes: 2 additions & 1 deletion example/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
"scripts": {
"dev": "next dev",
"gen-pages": "node scripts/gen-pages.mjs",
"build": "npm run gen-pages && next build",
"build": "npm run gen-pages && next build && next-sitemap",
"start": "next start"
},
"dependencies": {
"@vercel/analytics": "^1.1.1",
"next": "^13.0.6",
"next-sitemap": "^4.2.3",
"nextra": "2.13.2",
"nextra-theme-docs": "2.13.2",
"react": "^18.2.0",
Expand Down
13 changes: 3 additions & 10 deletions example/website/pages/Examples/custom-animations/quick-swipe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ import Carousel from "react-native-reanimated-carousel";

import { SBItem } from "@/components/SBItem";
import { window } from "@/constants/sizes";
import {
Image,
ImageSourcePropType,
View,
ViewStyle,
useWindowDimensions,
} from "react-native";
import { Image, ImageSourcePropType, View, ViewStyle } from "react-native";
import Animated, {
Easing,
Extrapolation,
Expand All @@ -73,7 +67,6 @@ import * as Haptics from "expo-haptics";
import { getImages } from "./images";
import { IS_WEB } from "@/constants/platform";

const PAGE_WIDTH = window.width;
const data = getImages().slice(0, 68);

function Index() {
Expand All @@ -82,8 +75,8 @@ function Index() {

const baseOptions = {
vertical: false,
width: 480,
height: PAGE_WIDTH / 2,
width: window.width,
height: window.width / 2,
} as const;

return (
Expand Down
9 changes: 9 additions & 0 deletions example/website/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# *
User-agent: *
Allow: /

# Host
Host: https://rn-carousel.dev

# Sitemaps
Sitemap: https://rn-carousel.dev/sitemap.xml
32 changes: 32 additions & 0 deletions example/website/public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://rn-carousel.dev</loc><lastmod>2024-10-12T11:03:23.720Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/basic-layouts/left-align</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/basic-layouts/normal</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/basic-layouts/parallax</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/basic-layouts/stack</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/advanced-parallax</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/anim-tab-bar</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/blur-parallax</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/blur-rotate</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/circular</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/cube-3d</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/curve</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/flow</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/fold</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/multiple</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/press-swipe</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/quick-swipe</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/rotate-fade-in-out</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/rotate-in-out</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/scale-fade-in-out</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/custom-animations/tinder</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/summary</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/Examples/utils/pagination</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/compare</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/concepts</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/custom-animations</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/faq</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/props</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://rn-carousel.dev/usage</loc><lastmod>2024-10-12T11:03:23.721Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>
4 changes: 4 additions & 0 deletions example/website/public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://rn-carousel.dev/sitemap-0.xml</loc></sitemap>
</sitemapindex>
41 changes: 40 additions & 1 deletion example/website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ __metadata:
languageName: node
linkType: hard

"@corex/deepmerge@npm:^4.0.43":
version: 4.0.43
resolution: "@corex/deepmerge@npm:4.0.43"
checksum: c9ac6163e982e81e3216a9fc7c68cd60b9788ad3b23d7387c9e9741b0274b42dfc332ae74b993e550c95e4256be5ce68045fc55d363aa083344392dc95b50d8b
languageName: node
linkType: hard

"@headlessui/react@npm:^1.7.10":
version: 1.7.17
resolution: "@headlessui/react@npm:1.7.17"
Expand Down Expand Up @@ -259,6 +266,13 @@ __metadata:
languageName: node
linkType: hard

"@next/env@npm:^13.4.3":
version: 13.5.7
resolution: "@next/env@npm:13.5.7"
checksum: d6465a2a85fa2f829d9c888b8a22be5649ad0f4bdd260e0a0061d7e88c7add33b702a6afead2d6cc6fde746b6132eb591e3baac7ece13e460c168517bb06205f
languageName: node
linkType: hard

"@next/swc-darwin-arm64@npm:13.5.6":
version: 13.5.6
resolution: "@next/swc-darwin-arm64@npm:13.5.6"
Expand Down Expand Up @@ -2054,7 +2068,7 @@ __metadata:
languageName: node
linkType: hard

"fast-glob@npm:^3.3.0":
"fast-glob@npm:^3.2.12, fast-glob@npm:^3.3.0":
version: 3.3.2
resolution: "fast-glob@npm:3.3.2"
dependencies:
Expand Down Expand Up @@ -4026,6 +4040,13 @@ __metadata:
languageName: node
linkType: hard

"minimist@npm:^1.2.8":
version: 1.2.8
resolution: "minimist@npm:1.2.8"
checksum: 908491b6cc15a6c440ba5b22780a0ba89b9810e1aea684e253e43c4e3b8d56ec1dcdd7ea96dde119c29df59c936cde16062159eae4225c691e19c70b432b6e6f
languageName: node
linkType: hard

"minipass-collect@npm:^2.0.1":
version: 2.0.1
resolution: "minipass-collect@npm:2.0.1"
Expand Down Expand Up @@ -4200,6 +4221,23 @@ __metadata:
languageName: node
linkType: hard

"next-sitemap@npm:^4.2.3":
version: 4.2.3
resolution: "next-sitemap@npm:4.2.3"
dependencies:
"@corex/deepmerge": "npm:^4.0.43"
"@next/env": "npm:^13.4.3"
fast-glob: "npm:^3.2.12"
minimist: "npm:^1.2.8"
peerDependencies:
next: "*"
bin:
next-sitemap: bin/next-sitemap.mjs
next-sitemap-cjs: bin/next-sitemap.cjs
checksum: 8e88c941b5e487584abaa21a31a94d888c8d37e95892cd6b5bdbc121f49435f75c279e97508a7a99d3de0010e833f3769d0c2d0888d9228be4dbd48e031b831c
languageName: node
linkType: hard

"next-themes@npm:^0.2.1":
version: 0.2.1
resolution: "next-themes@npm:0.2.1"
Expand Down Expand Up @@ -4925,6 +4963,7 @@ __metadata:
autoprefixer: "npm:^10.4.16"
dotenv: "npm:^16.4.5"
next: "npm:^13.0.6"
next-sitemap: "npm:^4.2.3"
nextra: "npm:2.13.2"
nextra-theme-docs: "npm:2.13.2"
postcss: "npm:^8.4.32"
Expand Down

0 comments on commit a3a98fb

Please sign in to comment.