Skip to content

Commit c129d9f

Browse files
committed
chore: update SEO tags + add new static assets
1 parent 2de8254 commit c129d9f

16 files changed

Lines changed: 91 additions & 414 deletions

docs/docusaurus.config.ts

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,17 @@ import { themes as prismThemes } from "prism-react-renderer"
44

55
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
66

7+
const title = "FS Prober"
8+
const siteUrl = "https://stacknide.github.io/fs-prober"
9+
const repoUrl = "https://github.com/stacknide/fs-prober"
10+
const meta = {
11+
description:
12+
"FS Prober extends react-dropzone by enabling detection of empty folders, including deeply nested ones. Fully compatible with react-dropzone, it leverages standard file system APIs for recursive directory traversals. Supports modern browsers.",
13+
siteUrl,
14+
socialCardUrl: `${siteUrl}/img/social-card.png`,
15+
}
716
const config: Config = {
8-
title: "FS Prober",
17+
title,
918
tagline:
1019
"FS Prober helps you extract file and folder structures from user inputs or drag-and-drop events in browsers.",
1120
favicon: "img/favicon.ico",
@@ -42,7 +51,7 @@ const config: Config = {
4251
sidebarPath: "./sidebars.ts",
4352
// Please change this to your repo.
4453
// Remove this to remove the "edit this page" links.
45-
editUrl: "https://github.com/stacknide/fs-prober/tree/main/docs",
54+
editUrl: `${repoUrl}/tree/main/docs`,
4655
},
4756
blog: false,
4857
// blog: {
@@ -53,7 +62,7 @@ const config: Config = {
5362
// },
5463
// // Please change this to your repo.
5564
// // Remove this to remove the "edit this page" links.
56-
// editUrl: "https://github.com/stacknide/fs-prober/tree/main/docs",
65+
// editUrl: `${repoUrl}/tree/main/docs`,
5766
// // Useful options to enforce blogging best practices
5867
// onInlineTags: "warn",
5968
// onInlineAuthors: "warn",
@@ -68,13 +77,33 @@ const config: Config = {
6877

6978
themeConfig: {
7079
// Replace with your project's social card
71-
image: "img/docusaurus-social-card.jpg",
80+
image: "img/social-card.png",
81+
metadata: [
82+
{ name: "robots", content: "max-image-preview:large" },
83+
{ name: "description", content: meta.description },
84+
85+
// Google / Search Engine Tags
86+
{ itemprop: "name", content: title },
87+
{ itemprop: "description", content: meta.description },
88+
{ itemprop: "image", content: meta.socialCardUrl },
89+
90+
// Open Graph / Facebook Meta Tags
91+
{ property: "og:url", content: meta.siteUrl },
92+
{ property: "og:type", content: "website" },
93+
{ property: "og:title", content: title },
94+
{ property: "og:description", content: meta.description },
95+
{ property: "og:image", content: meta.socialCardUrl },
96+
97+
// Twitter Meta Tags
98+
{ name: "twitter:card", content: "summary_large_image" },
99+
{ name: "twitter:title", content: title },
100+
{ name: "twitter:description", content: meta.description },
101+
{ name: "twitter:image", content: meta.socialCardUrl },
102+
{ name: "twitter:image:alt", content: `${title} logo` },
103+
],
72104
navbar: {
73-
title: "FS Prober",
74-
logo: {
75-
alt: "FS Prober",
76-
src: "img/logo.svg",
77-
},
105+
title,
106+
logo: { alt: `${title} logo`, src: "img/logo.svg" },
78107
items: [
79108
{
80109
type: "docSidebar",
@@ -83,11 +112,7 @@ const config: Config = {
83112
label: "Tutorial",
84113
},
85114
// { to: "/blog", label: "Blog", position: "left" },
86-
{
87-
href: "https://github.com/stacknide/fs-prober",
88-
label: "GitHub",
89-
position: "right",
90-
},
115+
{ href: repoUrl, label: "GitHub", position: "right" },
91116
],
92117
},
93118
footer: {
@@ -96,14 +121,8 @@ const config: Config = {
96121
{
97122
title: "Docs",
98123
items: [
99-
{
100-
label: "Introduction",
101-
to: "/docs/intro",
102-
},
103-
{
104-
label: "Usage Guide",
105-
to: "/docs/usage",
106-
},
124+
{ label: "Introduction", to: "/docs/intro" },
125+
{ label: "Usage Guide", to: "/docs/usage" },
107126
],
108127
},
109128
// {
@@ -135,14 +154,8 @@ const config: Config = {
135154
{
136155
title: "Links",
137156
items: [
138-
{
139-
label: "GitHub",
140-
href: "https://github.com/stacknide",
141-
},
142-
{
143-
label: "@ashuvssut (Author)",
144-
href: "https://github.com/ashuvssut",
145-
},
157+
{ label: "GitHub", href: repoUrl },
158+
{ label: "@ashuvssut (Author)", href: "https://github.com/ashuvssut" },
146159
],
147160
},
148161
],
@@ -152,6 +165,11 @@ const config: Config = {
152165
theme: prismThemes.github,
153166
darkTheme: prismThemes.dracula,
154167
},
168+
colorMode: {
169+
defaultMode: "dark",
170+
disableSwitch: false,
171+
respectPrefersColorScheme: true,
172+
},
155173
} satisfies Preset.ThemeConfig,
156174
}
157175

docs/src/pages/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export default function Home(): JSX.Element {
3030
const { siteConfig } = useDocusaurusContext()
3131
return (
3232
<Layout
33-
title={`Hello from ${siteConfig.title}`}
34-
description="Description will go into a meta tag in <head />"
33+
title={`${siteConfig.title} - ${siteConfig.tagline}`}
34+
// title={`Hello from ${siteConfig.title}`}
35+
// description="Description will go into a meta tag in <head />"
3536
>
3637
<HomepageHeader />
3738
<main>
13 KB
Loading
51.8 KB
Loading
10.8 KB
Loading
-54.4 KB
Binary file not shown.

docs/static/img/docusaurus.png

-5.02 KB
Binary file not shown.

docs/static/img/favicon-16x16.png

611 Bytes
Loading

docs/static/img/favicon-32x32.png

1.35 KB
Loading

docs/static/img/favicon.ico

11.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)