@m13v/seo-components 0.8.11 → 0.8.12

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.11",
3
+ "version": "0.8.12",
4
4
  "scripts": {
5
5
  "build:css": "tailwind -i src/_build.css -o dist/styles.css --minify",
6
6
  "prepublishOnly": "npm run build:css"
@@ -70,9 +70,9 @@ export function discoverGuides(contentDir?: string): GuideEntry[] {
70
70
  : [];
71
71
  const hrefPrefix = "/" + segments.join("/");
72
72
 
73
+ const filterPrefix = hrefPrefix === "/" ? "/" : hrefPrefix + "/";
73
74
  guides = allPages
74
- .filter((p) => p.href.startsWith(hrefPrefix + "/") || p.href === hrefPrefix)
75
- .filter((p) => p.href !== hrefPrefix)
75
+ .filter((p) => p.href.startsWith(filterPrefix) && p.href !== hrefPrefix)
76
76
  .map(pageToGuide);
77
77
  }
78
78
 
package/src/next.js CHANGED
@@ -160,8 +160,9 @@ function buildManifest(contentDir) {
160
160
  : [];
161
161
  const hrefPrefix = "/" + segments.join("/");
162
162
 
163
+ const filterPrefix = hrefPrefix === "/" ? "/" : hrefPrefix + "/";
163
164
  const filtered = pages.filter(p =>
164
- (p.href.startsWith(hrefPrefix + "/") || p.href === hrefPrefix) && p.href !== hrefPrefix
165
+ p.href.startsWith(filterPrefix) && p.href !== hrefPrefix
165
166
  );
166
167
 
167
168
  filtered.sort((a, b) =>