@codepress/blog 0.2.0 → 0.2.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/README.md CHANGED
@@ -14,7 +14,7 @@ npm install
14
14
  `/blog/feed.xml` and `/blog/sitemap.xml`, plus `codepress-blog.ts` with the
15
15
  config. The pages render inside your root layout and import
16
16
  `@codepress/blog/blog.css`. It checks both the `app/` and `pages/` trees
17
- first and changes nothing if `/blog` is already served. `--force` overwrites the
17
+ first (each where Next.js serves it: a root `app/` hides `src/app/`) and changes nothing if `/blog` is already served. `--force` overwrites the
18
18
  files `init` itself writes and keeps other `/blog` routes, but a `/blog` URL
19
19
  served from a different file (the other router, a route group,
20
20
  `pages/blog.tsx`) still stops it: move or delete that file first. Other options: `--base-path`, `--api-base`, `--revalidate`,
package/dist/cli.js CHANGED
@@ -70,9 +70,10 @@ function detectLayout(root, forced) {
70
70
  );
71
71
  }
72
72
  const routesDir = (router === "app" ? app : pages) ?? path.join(root, router);
73
- const allRoutesDirs = ["app", "pages"].flatMap(
74
- (name) => [path.join(root, name), path.join(root, "src", name)].filter(isDirectory).map((dir) => ({ dir, router: name }))
75
- );
73
+ const allRoutesDirs = [
74
+ ...app ? [{ dir: app, router: "app" }] : [],
75
+ ...pages ? [{ dir: pages, router: "pages" }] : []
76
+ ];
76
77
  return {
77
78
  root,
78
79
  router,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codepress/blog",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Render a CodePress blog: registry, sanitizer, schema, SEO, feed, sitemap, content source and React renderer.",
5
5
  "type": "module",
6
6
  "sideEffects": [