Skip to content

Add minimal default theme to zola init#3139

Open
nooscraft wants to merge 3 commits intogetzola:nextfrom
nooscraft:add-default-theme
Open

Add minimal default theme to zola init#3139
nooscraft wants to merge 3 commits intogetzola:nextfrom
nooscraft:add-default-theme

Conversation

@nooscraft
Copy link
Copy Markdown

@nooscraft nooscraft commented Apr 10, 2026

Summary

Fixes #3137.

zola init currently creates empty directories, causing immediate errors when running zola serve. This PR adds a minimal default theme so new users have a working site out of the box.

What changes

Running zola init now generates:

  • .gitignore (ignores public/, .DS_Store)
  • README.md with basic commands
  • content/_index.md - homepage content
  • templates/base.html, index.html, page.html, section.html - basic templates
  • static/style.css - ~150 lines of minimal CSS using system fonts

That's it. No dependencies, no JavaScript, no web fonts.

Why this approach

Per @Keats's guidance in #3137, following 11ty's minimal style: enough to look intentional and not broken, but easy to replace entirely.

Backward compatibility

Fully backward compatible. All existing tests pass. The --force flag works as before. Only adds files; no behavior changes.


Note to @ReduxFlakes and @daudix: Sorry for the confusion earlier. The original description was way too verbose. Hope this version is clearer.

- Introduced .gitignore, README.md, and initial content files.
- Added base, index, page, and section templates for rendering.
- Included a default style.css for basic styling.
- Updated tests to verify the creation of new files and directories.
@nooscraft nooscraft marked this pull request as draft April 10, 2026 06:05
@nooscraft nooscraft changed the base branch from master to next April 10, 2026 06:13
@nooscraft nooscraft marked this pull request as ready for review April 10, 2026 06:15
Comment thread src/cmd/init.rs
- Replaced hardcoded content in init.rs with includes for default theme files.
- Added .gitignore, README.md, and initial content files for the default theme.
- Introduced base, index, page, and section templates for rendering.
- Included a default style.css for basic styling.
@nooscraft nooscraft requested a review from Keats April 10, 2026 12:41
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.

Improving zola init - thoughts?

2 participants