CLItheme
theme init
Create a new StoreOS theme from the starter theme.
Creates a theme in a new or empty folder. By default it uses the full starter theme: a header, footer, hero, featured products, and a widget for every page.
Usage
storeos theme init [dir] [flags]dir defaults to ./my-theme. Use . for the current folder. The folder must not exist yet or must be empty. A .gitignore for zips and .DS_Store is added too.
Flags
| Flag | Description |
|---|---|
--blank | Create only layout/theme.fluid, config/document.json and assets/theme.css, with empty widgets/ and snippets/ folders |
Output
> storeos theme init my-theme
✓ Created my-theme (19 files)
Next:
cd my-theme
storeos theme dev
layout/theme.fluid page shell
widgets/*.fluid widgets (add one: storeos theme new widget <name>)
snippets/*.fluid partials for {% render %}
assets/ css, js, images, fonts
config/document.json starting header, footer and pages
locales/en.default.json strings for the t filterWith --blank:
> storeos theme init my-theme --blank
✓ Created my-theme (blank theme)
Next:
cd my-theme
storeos theme dev
layout/theme.fluid page shell
config/document.json which widgets each page shows
assets/theme.css your styles
widgets/ empty: storeos theme new widget <name> adds oneExamples
storeos theme init my-theme # the full starter theme
storeos theme init my-theme --blank # only the required files
storeos theme init . # in the current folder