@mel000000/weweb-dynamic-metadata 1.0.17 → 1.0.18

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": "@mel000000/weweb-dynamic-metadata",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "type": "module",
5
5
  "description": "Generate dynamic metadata for WeWeb static exports",
6
6
  "main": "src/index.js",
@@ -186,24 +186,23 @@ export async function processFiles() {
186
186
  await fs.copyFile(metadataJsPath, path.join(paramDir, 'metadata.js'));
187
187
 
188
188
 
189
- // Create reference files using the ORIGINAL working logic
189
+ // Create reference files
190
190
  const relativeTemplatePath = '../_param/index.html';
191
191
  let referencesCreated = 0;
192
-
192
+
193
193
  for (const [id, metadata] of metadataMap.entries()) {
194
194
  try {
195
195
  const contentDir = path.join(baseDir, routeName, id);
196
196
  await fs.ensureDir(contentDir);
197
197
 
198
198
  await fs.writeFile(
199
- path.join(contentRootDir, 'index.html'),
199
+ path.join(contentDir, 'index.html'),
200
200
  generateReferenceHtml(id, metadata.title, relativeTemplatePath, routeName),
201
201
  );
202
202
 
203
-
204
203
  referencesCreated++;
205
204
  } catch (error) {
206
- // Silently continue
205
+ console.error(`Failed to create reference for ID ${id}:`, error.message);
207
206
  }
208
207
  }
209
208