Add minimal default theme to zola init#3139
Open
nooscraft wants to merge 3 commits intogetzola:nextfrom
Open
Conversation
- 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.
Keats
requested changes
Apr 10, 2026
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3137.
zola initcurrently creates empty directories, causing immediate errors when runningzola serve. This PR adds a minimal default theme so new users have a working site out of the box.What changes
Running
zola initnow generates:.gitignore(ignorespublic/,.DS_Store)README.mdwith basic commandscontent/_index.md- homepage contenttemplates/base.html,index.html,page.html,section.html- basic templatesstatic/style.css- ~150 lines of minimal CSS using system fontsThat'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
--forceflag 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.