Skip to content

Conversation

@semihpolat
Copy link
Contributor

@semihpolat semihpolat commented Jan 8, 2026

Purpose of this pull request:
Consolidate template handling to work with the new templates/ directory structure.

  1. Load all templates (including default) from templates/ directory
  2. Move default template files from root src/ to templates/default/src/ to establish a consistent template directory structure.

(optional) Issues fixed: fixes #, fixes #

IMPORTANT - UI CHANGE DEMONSTRATION

If making a change that changes the existing UI, or adds/changes new UI elements like components, themes, or templates, you MUST include screenshots or demos/recordings of your changes:

Screenshots:

Site preview link:

Other things worth discussing regarding PR:

Anything not covered by previous sections


console.log(chalk.blue(`🗿 Statue SSG - Initializing '${templateName}' template...`));

// 1. Copy content
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have root content anymore, that's why this part(1. copy content) is removed


// 3. Copy template (src + site.config.js + static + scripts)
// Always copy base files first (app.html, lib/index.css), then template overrides
fs.copySync(path.join(sourceDir, 'src/app.html'), path.join(targetDir, 'src/app.html'), { overwrite: true });
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sveltekit already generates app.html at init

try {
// Check if template exists before proceeding
// 'default' always exists (it's the package root)
if (templateName !== 'default') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer need a condition for isDefault, since the default related files now live under the same path as the other templates.

@fredxfred fredxfred merged commit d35fbe0 into main Jan 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Treat default template like a template, get rid of resources/ server

3 participants