@jsnchn/buntastic 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsnchn/buntastic",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A simple static site generator built with Bun",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -111,9 +111,10 @@ async function resolveLayout(frontmatter: Frontmatter): Promise<{ template: stri
111
111
  const headMatch = childContent.match(/\[head\]([\s\S]*?)\[\/head\]/);
112
112
  if (headMatch) {
113
113
  childHead = headMatch[1].trim();
114
+ childBody = childContent.replace(headMatch[0], '').trim();
115
+ } else {
116
+ childBody = childContent;
114
117
  }
115
-
116
- childBody = childContent;
117
118
 
118
119
  const parentResult = await resolveLayout({ extends: parentLayout[1] } as Frontmatter);
119
120