Skip to content

Change default starter project structure#23

Merged
ryanmphill merged 3 commits intomainfrom
change-default-project-structure
Dec 14, 2025
Merged

Change default starter project structure#23
ryanmphill merged 3 commits intomainfrom
change-default-project-structure

Conversation

@ryanmphill
Copy link
Copy Markdown
Owner

This pull request updates the static site generator's project template and core logic to use a simplified directory structure (removing the theme subdirectory), and improves path handling in the data loader to make it more flexible and maintainable. The most important changes are grouped below:

Project template and configuration updates:

  • Updated build_settings.json and all project template paths to remove the theme subdirectory, simplifying the directory structure for markdown, static assets, scripts, styles, and views. [1] [2] [3]
  • Updated the version field in pyproject.toml to 0.0.1a2 to reflect these changes.

Data loader and path handling improvements:

  • Modified the SettingsDict schema and related logic to support the new directory layout and to store the entire settings dictionary for easier access. [1] [2] [3]
  • Refactored path splitting and directory traversal logic in methods like load_args, load_pages, _get_nested_markdown_dirs, and _get_nested_json_dirs to use the configured paths from settings, making the code more robust to future directory changes. [1] [2] [3]
  • Simplified the template directory traversal by removing hardcoded defaults and requiring explicit paths, further aligning with the new configuration-driven approach.

- Remove 'theme' layer from default directory structure
- Update paths from 'src/theme/*' to 'src/*' throughout codebase
- Modify build_settings.json to reflect new simplified paths
- Update data_loader.py to use dynamic path resolution from settings
- Adjust template_handler.py to get paths from settings instead of hardcoded values
- Update all test files and fixtures to use new directory structure
- Maintain backward compatibility through settings configuration

This change makes the default project structure more intuitive by
removing an unnecessary nesting level while preserving flexibility
through the root_template_paths configuration option.
@ryanmphill ryanmphill merged commit c8fff3c into main Dec 14, 2025
6 checks passed
@ryanmphill ryanmphill deleted the change-default-project-structure branch December 14, 2025 22:48
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.

1 participant