-
-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Assuming a running blog, where the user already have the /templates and /static folders generated when the user first executed marmite to start a new site.
scenario
User created the site using and the marmite inputdir --init-site
command.
inputdir/templates and inputdir/static was created by marmite.
Now the user wants to upgrade to marmite 0.2.6, which brings a lot of improvements to the templates, how does the user get their templates and static files updated?
marmite inputdir --migrate-theme # migrate from default to named theme
This command will:
- Create a new folder inputdir/theme_{date} (where date is current date + time as 2015_01_01_23_42_55, eg. theme_2015_01_01_23_42_55)
- Copy the embedded templates from
example/templates
(initialize_templates) and embedded static fromexample/static
(generate_static) to inputdir/theme_{date}, so theinputdir/theme_{date}
will havetemplates
andstatic
subfolders taken from marmite embedded template. - Copy from user /templates and /static any files that are not already present on theme/templates and theme_{date}/static
- Generate inputdir/theme.json
- Set
theme: theme_{date}
on marmite.yaml
Done.
Now the site will be built from the new "theme_{date}" and the legacy templates and static are kept in case user needs to move additional custom files.
This provides a smooth way to upgrade from legacy built-in theme to a named theme but keep using the same templates and style.