This PR introduces two new flags, --init-templates and --start-theme, to the Marmite CLI, allowing users to initialize project templates and themes more easily. The new flags add the following functionality:
--init-templates: Creates a templates/ folder in the output directory, adding a base.html file as a starter template.
--start-theme: Extends the --init-templates command by additionally creating a static/ folder with placeholder files (style.css, script.js) referenced by the templates.
To support these new flags, two functions were added:
initialize_templates: Sets up the templates directory and base files.
initialize_theme_assets: Sets up the static assets directory and initial CSS/JS files.
Both functions are currently in a new module, initializer.rs, but they contain only placeholder code for now.
Questions
Before proceeding with the complete implementation, we would like some input on how the initialize_templates and initialize_theme_assets functions should be implemented. Specifically:
Template Content: What content should be included in the base.html file within the templates folder? Should it be a full HTML skeleton, or just a simple comment indicating where customization can begin?
Static Assets: Should style.css and script.js in the static/ folder include specific starter content, or can they be empty placeholders?
This PR introduces two new flags,
--init-templates
and--start-theme
, to the Marmite CLI, allowing users to initialize project templates and themes more easily. The new flags add the following functionality:--init-templates
: Creates atemplates/
folder in the output directory, adding abase.html
file as a starter template.--start-theme
: Extends the--init-templates
command by additionally creating astatic/
folder with placeholder files (style.css
,script.js
) referenced by the templates.To support these new flags, two functions were added:
initialize_templates
: Sets up thetemplates
directory and base files.initialize_theme_assets
: Sets up thestatic
assets directory and initial CSS/JS files.Both functions are currently in a new module,
initializer.rs
, but they contain only placeholder code for now.Questions
Before proceeding with the complete implementation, we would like some input on how the
initialize_templates
andinitialize_theme_assets
functions should be implemented. Specifically:base.html
file within thetemplates
folder? Should it be a full HTML skeleton, or just a simple comment indicating where customization can begin?style.css
andscript.js
in thestatic/
folder include specific starter content, or can they be empty placeholders?Related Issue : #70