Themes are plugins you can add to your Bridgetown website which may provide layouts, content, Liquid components, and frontend assets, as well as perform other tasks to enhance the functionality of your site.
You install a theme the same way you’d install any plugin, either by running a command such as:
bundle add really-cool-theme -g bridgetown_plugins
Or by applying an automation:
bundle exec bridgetown apply https://github.com/super-great-themes/theme-one
Sometimes you might want to copy files out of a theme and into your site
repo directly. The
bridgetown plugins cd command
will help you do just that.
Creating a Theme
To design a theme to distribute to others, simply create a standard
gem-based plugin using the
bridgetown plugins new NAME
command. Follow that link for more on live testing strategies and how to
release and publish your theme.
You’ll need to use a Source Manifest to instruct the Bridgetown build process where to find your theme files.
To provide frontend assets via Webpack, follow these instructions.
To aid your users in installing your plugin and setting up configuration
options and so forth, add a
bridgetown.automation.rb automation script
to your theme repo.
As always, if you have any questions or need support in creating your theme, check out our community resources.