Skip to content

Commit dd38041

Browse files
committed
feat: add sitemap integration and update site configuration
- Integrated `@astrojs/sitemap` for automatic sitemap generation. - Updated site URL in `astro.config.mjs`. - Added `robots.txt` to allow search engines to crawl the site. - Updated package dependencies to include `@astrojs/sitemap`. - Enhanced various documentation pages with descriptions for better SEO. - Improved layout and styling in the main page and other components. - Refactored the recipes page to use a more concise format. - Added social proof statistics for weekly downloads and GitHub stars.
1 parent 58a474c commit dd38041

22 files changed

Lines changed: 234 additions & 377 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ The documentation contains information about installation, usage and contributio
4242

4343
# Supporting React Data Table Component
4444

45-
React Data Table Component is maintained by one person and downloaded ~200k times a week. If your team ships products with it, your support keeps it maintained, bug-free, and moving forward.
45+
React Data Table Component has been actively maintained since 2018 and is downloaded ~215k times a week. If your team ships products with it, your support keeps it maintained, bug-free, and moving forward.
4646

4747
## Sponsor the project
4848

49-
Sponsoring puts your company logo in front of ~200k developers a week: in the README, the docs site, and every release. It's the right move if your team depends on this library and you want it to keep improving.
49+
Sponsoring puts your company logo in front of ~215k developers a week: in the README, the docs site, and every release. It's the right move if your team depends on this library and you want it to keep improving.
5050

5151
| Tier | Price/month | Perk |
5252
| --- | --- | --- |

apps/docs/astro.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { defineConfig } from 'astro/config';
22
import react from '@astrojs/react';
33
import tailwind from '@astrojs/tailwind';
4+
import sitemap from '@astrojs/sitemap';
45

56
export default defineConfig({
7+
site: 'https://reactdatatable.com',
68
markdown: {
79
shikiConfig: { theme: 'catppuccin-macchiato' },
810
},
9-
integrations: [react(), tailwind({ applyBaseStyles: false })],
11+
integrations: [react(), tailwind({ applyBaseStyles: false }), sitemap()],
1012
vite: {
1113
resolve: {
1214
alias: {

apps/docs/package-lock.json

Lines changed: 70 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@astrojs/react": "^4.2.0",
13+
"@astrojs/sitemap": "^3.7.2",
1314
"@astrojs/tailwind": "^5.1.4",
1415
"@shikijs/langs": "^4.1.0",
1516
"astro": "^5.7.0",

apps/docs/public/robots.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
User-agent: *
2+
Allow: /
3+
4+
Sitemap: https://reactdatatable.com/sitemap-index.xml

apps/docs/src/components/CodeBlock.astro

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { code, lang = 'tsx' } = Astro.props;
1313
<div class="not-prose my-6 rounded-xl overflow-hidden text-sm leading-relaxed relative group">
1414
<Code code={code} lang={lang} theme="catppuccin-macchiato" defaultColor={false} />
1515
<button
16-
class="copy-btn absolute top-3 right-3 flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-white/10 text-gray-300 hover:bg-white/20 hover:text-white opacity-0 group-hover:opacity-100 transition-all"
16+
class="copy-btn absolute top-[24px] right-4 flex items-center p-1.5 rounded-md bg-white/10 text-gray-300 hover:bg-white/20 hover:text-white opacity-0 group-hover:opacity-100 transition-all"
1717
aria-label="Copy code"
1818
data-code={code}
1919
>
@@ -24,7 +24,6 @@ const { code, lang = 'tsx' } = Astro.props;
2424
<svg class="icon-check hidden" width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2525
<polyline points="2 8 6 12 14 4"/>
2626
</svg>
27-
<span class="label">Copy</span>
2827
</button>
2928
</div>
3029

@@ -35,14 +34,11 @@ const { code, lang = 'tsx' } = Astro.props;
3534
await navigator.clipboard.writeText(code);
3635
const iconCopy = btn.querySelector<SVGElement>('.icon-copy');
3736
const iconCheck = btn.querySelector<SVGElement>('.icon-check');
38-
const label = btn.querySelector<HTMLSpanElement>('.label');
3937
iconCopy?.classList.add('hidden');
4038
iconCheck?.classList.remove('hidden');
41-
if (label) label.textContent = 'Copied!';
4239
setTimeout(() => {
4340
iconCopy?.classList.remove('hidden');
4441
iconCheck?.classList.add('hidden');
45-
if (label) label.textContent = 'Copy';
4642
}, 2000);
4743
});
4844
});

apps/docs/src/layouts/Layout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const {
2828
<meta name="twitter:title" content={title} />
2929
<meta name="twitter:description" content={description} />
3030
<meta name="twitter:image" content={new URL('/og-image.png', Astro.url).href} />
31+
<link rel="canonical" href={Astro.url.href} />
3132
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
3233
<title>{title}</title>
3334
</head>
@@ -151,7 +152,6 @@ const {
151152
<p>
152153
Apache 2.0 licensed ·
153154
<a href="https://github.com/jbetancur/react-data-table-component" class="hover:text-gray-600">GitHub</a>
154-
· Built with Astro
155155
</p>
156156
</footer>
157157

apps/docs/src/pages/docs/accessibility.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: '../../layouts/DocsLayout.astro'
33
title: 'Accessibility | react-data-table-component'
4+
description: 'ARIA roles, keyboard navigation, and screen reader support in react-data-table-component.'
45
---
56

67

apps/docs/src/pages/docs/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
layout: '../../layouts/DocsLayout.astro'
33
title: 'API reference | react-data-table-component'
4+
description: 'Complete prop, type, and export reference for react-data-table-component v8.'
45
---
56

67
# API reference

apps/docs/src/pages/docs/changelog.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import DocsLayout from '../../layouts/DocsLayout.astro';
33
import CodeBlock from '../../components/CodeBlock.astro';
44
---
55

6-
<DocsLayout title="Changelog | react-data-table-component">
6+
<DocsLayout title="Changelog | react-data-table-component" description="Release history and breaking changes for react-data-table-component.">
77
<h1>Changelog</h1>
88

99
<p>

0 commit comments

Comments
 (0)