@rmdes/indiekit-preset-eleventy 1.0.0-beta.25 → 1.0.0-beta.26

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.
@@ -58,8 +58,18 @@ const getFrontMatter = (properties) => {
58
58
 
59
59
  // Convert url to Eleventy permalink so generated URL matches Indiekit's stored URL
60
60
  // Add trailing slash to generate /path/index.html instead of /path.html
61
+ // Extract path from full URL since Eleventy expects a path, not a full URL
61
62
  if (properties.url) {
62
- const url = properties.url;
63
+ let url = properties.url;
64
+ // If it's a full URL, extract just the pathname
65
+ if (url.startsWith("http://") || url.startsWith("https://")) {
66
+ try {
67
+ const parsed = new URL(url);
68
+ url = parsed.pathname;
69
+ } catch {
70
+ // If URL parsing fails, use as-is
71
+ }
72
+ }
63
73
  properties.permalink = url.endsWith("/") ? url : `${url}/`;
64
74
  }
65
75
  delete properties.url;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-preset-eleventy",
3
- "version": "1.0.0-beta.25",
3
+ "version": "1.0.0-beta.26",
4
4
  "description": "Eleventy publication preset for Indiekit (fork with permalink fix)",
5
5
  "keywords": [
6
6
  "indiekit",