@m13v/seo-components 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m13v/seo-components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "39 animated React components for programmatic SEO pages. Remotion video, Magic UI style animations, trust signals, JSON-LD helpers. Teal/cyan brand, light-theme only.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -29,6 +29,8 @@ export interface SitemapSidebarProps {
|
|
|
29
29
|
/** Custom category labels. Keys are path segments, values are display names.
|
|
30
30
|
* Built-in defaults: t -> "Guides", blog -> "Blog", compare -> "Comparisons", etc. */
|
|
31
31
|
categoryLabels?: Record<string, string>;
|
|
32
|
+
/** Paths where the sidebar should be hidden (e.g. ["/"] to hide on the home page). */
|
|
33
|
+
hideOnPaths?: string[];
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
const DEFAULT_LABELS: Record<string, string> = {
|
|
@@ -68,6 +70,7 @@ export function SitemapSidebar({
|
|
|
68
70
|
brandLogo,
|
|
69
71
|
homeHref = "/",
|
|
70
72
|
categoryLabels,
|
|
73
|
+
hideOnPaths,
|
|
71
74
|
}: SitemapSidebarProps) {
|
|
72
75
|
const pathname = usePathname();
|
|
73
76
|
const [query, setQuery] = useState("");
|
|
@@ -129,6 +132,9 @@ export function SitemapSidebar({
|
|
|
129
132
|
return () => observer.disconnect();
|
|
130
133
|
}, [pathname]);
|
|
131
134
|
|
|
135
|
+
// Hide sidebar on specified paths (checked after all hooks)
|
|
136
|
+
if (hideOnPaths?.includes(pathname)) return null;
|
|
137
|
+
|
|
132
138
|
const handleSectionClick = (
|
|
133
139
|
e: React.MouseEvent<HTMLAnchorElement>,
|
|
134
140
|
sectionId: string,
|