aeo.js 0.0.8 → 0.0.9
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 +119 -164
- package/dist/angular.js +4 -2
- package/dist/angular.js.map +1 -1
- package/dist/angular.mjs +4 -2
- package/dist/angular.mjs.map +1 -1
- package/dist/astro.js +4 -2
- package/dist/astro.js.map +1 -1
- package/dist/astro.mjs +4 -2
- package/dist/astro.mjs.map +1 -1
- package/dist/cli.js +4 -2
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +4 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +6 -4
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +6 -4
- package/dist/next.mjs.map +1 -1
- package/dist/nuxt.js +4 -2
- package/dist/nuxt.js.map +1 -1
- package/dist/nuxt.mjs +4 -2
- package/dist/nuxt.mjs.map +1 -1
- package/dist/vite.js +4 -2
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +4 -2
- package/dist/vite.mjs.map +1 -1
- package/dist/webpack.js +4 -2
- package/dist/webpack.js.map +1 -1
- package/dist/webpack.mjs +4 -2
- package/dist/webpack.mjs.map +1 -1
- package/package.json +1 -1
package/dist/next.js
CHANGED
|
@@ -285,7 +285,8 @@ function collectMarkdownFiles(dir, base = dir) {
|
|
|
285
285
|
for (const entry of entries) {
|
|
286
286
|
const fullPath = path.join(dir, entry);
|
|
287
287
|
const stat = fs.statSync(fullPath);
|
|
288
|
-
|
|
288
|
+
const SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "public", "dist", ".next", ".nuxt", ".output", ".open-next", "coverage", "__tests__", "__mocks__"]);
|
|
289
|
+
if (stat.isDirectory() && !entry.startsWith(".") && !SKIP_DIRS.has(entry)) {
|
|
289
290
|
files.push(...collectMarkdownFiles(fullPath, base));
|
|
290
291
|
} else if (stat.isFile() && (path.extname(entry) === ".md" || path.extname(entry) === ".mdx")) {
|
|
291
292
|
const content = fs.readFileSync(fullPath, "utf-8");
|
|
@@ -628,7 +629,8 @@ function collectUrls(dir, config, base = dir) {
|
|
|
628
629
|
for (const entry of entries) {
|
|
629
630
|
const fullPath = path.join(dir, entry);
|
|
630
631
|
const stat = fs.statSync(fullPath);
|
|
631
|
-
|
|
632
|
+
const SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", "public", "dist", ".next", ".nuxt", ".output", ".open-next", "coverage", "__tests__", "__mocks__"]);
|
|
633
|
+
if (stat.isDirectory() && !entry.startsWith(".") && !SKIP_DIRS.has(entry)) {
|
|
632
634
|
urls.push(...collectUrls(fullPath, config, base));
|
|
633
635
|
} else if (stat.isFile() && (path.extname(entry) === ".md" || path.extname(entry) === ".mdx" || path.extname(entry) === ".html")) {
|
|
634
636
|
const relativePath = path.relative(base, fullPath);
|
|
@@ -1211,7 +1213,7 @@ function withAeo(nextConfig = {}) {
|
|
|
1211
1213
|
page.description = aeoOptions.description;
|
|
1212
1214
|
}
|
|
1213
1215
|
}
|
|
1214
|
-
const contentDir = aeoOptions.contentDir ||
|
|
1216
|
+
const contentDir = aeoOptions.contentDir || [path.join(projectRoot, "content"), path.join(projectRoot, "docs"), path.join(projectRoot, "src")].find((d) => fs.existsSync(d)) || path.join(projectRoot, "content");
|
|
1215
1217
|
const resolvedConfig = resolveConfig({
|
|
1216
1218
|
...aeoOptions,
|
|
1217
1219
|
outDir: aeoOptions.outDir || path.join(projectRoot, "public"),
|
|
@@ -1331,7 +1333,7 @@ async function postBuild(config = {}) {
|
|
|
1331
1333
|
page.description = config.description;
|
|
1332
1334
|
}
|
|
1333
1335
|
}
|
|
1334
|
-
const contentDir = config.contentDir ||
|
|
1336
|
+
const contentDir = config.contentDir || [path.join(projectRoot, "content"), path.join(projectRoot, "docs"), path.join(projectRoot, "src")].find((d) => fs.existsSync(d)) || path.join(projectRoot, "content");
|
|
1335
1337
|
const resolvedConfig = resolveConfig({
|
|
1336
1338
|
...config,
|
|
1337
1339
|
outDir: config.outDir || path.join(projectRoot, "public"),
|