Skip to content

Commit c0785b2

Browse files
committed
chore(docsite): update Docusaurus to v3.8.1 and improve SEO
- Remove outdated intro.md tutorial page - Update favicon to .ico format - Add meta tags for keywords, description, robots, author, and canonical URL - Enable last update author/time in docs - Configure sitemap with weekly changefreq and priority 0.5 - Add Twitter and Open Graph metadata - Upgrade Docusaurus dependencies and plugins to v3.8.1 - Hide duplicate code language labels in CSS - Update homepage title for clarity - Enhance robots.txt with crawl delay and explicit sitemap URL - Upgrade various package dependencies in package-lock.json
1 parent bcf2d43 commit c0785b2

File tree

7 files changed

+966
-1413
lines changed

7 files changed

+966
-1413
lines changed

docsite/docs/intro.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docsite/docusaurus.config.ts

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type * as Preset from '@docusaurus/preset-classic';
55
const config: Config = {
66
title: 'oxidize.rb',
77
tagline: 'Building Ruby extensions with Rust using rb-sys',
8-
favicon: 'img/favicon.png',
8+
favicon: 'img/favicon.ico',
99

1010
url: 'https://oxidize-rb.org',
1111
baseUrl: '/',
@@ -24,6 +24,44 @@ const config: Config = {
2424
// No custom scripts needed
2525
scripts: [],
2626

27+
headTags: [
28+
{
29+
tagName: 'meta',
30+
attributes: {
31+
name: 'keywords',
32+
content: 'ruby, rust, extensions, ffi, rb-sys, oxidize, native extensions, ruby gems',
33+
},
34+
},
35+
{
36+
tagName: 'meta',
37+
attributes: {
38+
name: 'description',
39+
content: 'Build high-performance Ruby extensions with Rust using rb-sys. The easiest way to create native Ruby gems with memory safety and performance.',
40+
},
41+
},
42+
{
43+
tagName: 'meta',
44+
attributes: {
45+
name: 'robots',
46+
content: 'index, follow',
47+
},
48+
},
49+
{
50+
tagName: 'meta',
51+
attributes: {
52+
name: 'author',
53+
content: 'oxidize-rb',
54+
},
55+
},
56+
{
57+
tagName: 'link',
58+
attributes: {
59+
rel: 'canonical',
60+
href: 'https://oxidize-rb.org',
61+
},
62+
},
63+
],
64+
2765
presets: [
2866
[
2967
'classic',
@@ -32,17 +70,31 @@ const config: Config = {
3270
sidebarPath: './sidebars.ts',
3371
editUrl: 'https://github.com/oxidize-rb/rb-sys/tree/main/docsite/',
3472
routeBasePath: '/docs',
73+
showLastUpdateAuthor: true,
74+
showLastUpdateTime: true,
3575
},
3676
blog: false,
3777
theme: {
3878
customCss: './src/css/custom.css',
3979
},
80+
sitemap: {
81+
changefreq: 'weekly',
82+
priority: 0.5,
83+
ignorePatterns: ['/tags/**'],
84+
filename: 'sitemap.xml',
85+
},
4086
} satisfies Preset.Options,
4187
],
4288
],
4389

4490
themeConfig: {
4591
image: 'img/social-card.png',
92+
metadata: [
93+
{name: 'twitter:card', content: 'summary_large_image'},
94+
{name: 'twitter:site', content: '@oxidize_rb'},
95+
{property: 'og:type', content: 'website'},
96+
{property: 'og:locale', content: 'en_US'},
97+
],
4698
colorMode: {
4799
defaultMode: 'dark',
48100
disableSwitch: false,

0 commit comments

Comments
 (0)