Custom layout bypasses shortcode, hardcodes Vite dev server port 5173 #16

Open
opened 2026-10-22 19:42:55 +00:00 by xrd · 0 comments
Owner

Problem

Custom layouts/posts/single.html that checks for svekyll posts via frontmatter bypasses the shortcode sprinkyll injects, rendering hardcoded Vite dev server inline script instead.

Root Cause

The layout checks sprinkyll.type == svekyll frontmatter, renders inline script with port 5173, does NOT call .Content.

Impact

  • Production builds have inline scripts referencing port 5173
  • bundle.js never loaded, shortcode bypassed
  • Site broken in production

Fix

Layout should use hugo.IsProduction and render .Content (shortcode) in production.

## Problem Custom layouts/posts/single.html that checks for svekyll posts via frontmatter bypasses the shortcode sprinkyll injects, rendering hardcoded Vite dev server inline script instead. ## Root Cause The layout checks sprinkyll.type == svekyll frontmatter, renders inline script with port 5173, does NOT call .Content. ## Impact - Production builds have inline scripts referencing port 5173 - bundle.js never loaded, shortcode bypassed - Site broken in production ## Fix Layout should use hugo.IsProduction and render .Content (shortcode) in production.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
svekyll/sprinkyll#16
No description provided.