Getting Started
Customization
FreshJuice is designed to be a flexible and customizable theme that can be tailored to meet your specific needs.
Customization via HubSpot Design Manager
The easiest way to customize FreshJuice is through the HubSpot Design Manager. You can access the Design Manager by navigating to Content > Design Manager in your HubSpot account.
Here are some common customization options you can explore:
- Edit CSS: You can modify the theme's CSS to change the appearance of various elements on your website. You can add custom styles, adjust colors, fonts, and spacing to match your brand's identity.
We recommend edit only~/FreshJuice/css/theme-overrides.cssfile to avoid conflicts with future updates. - Edit JavaScript: The
~/FreshJuice/js/main.jsis the main JavaScript file , compiled from~/source/js/main.js.
We strongly recommend to not edit this file directly. Instead, you can inline JS code using Alpine.js directives in HubL templates. - Edit Templates: You can customize the theme's templates to create unique layouts for different pages on your website. You can add or remove modules, rearrange content, and create custom templates to suit your content needs.
- Edit Modules: You can customize individual modules within the theme to add new functionality or modify existing features. You can create custom modules, adjust settings, and style modules to match your design preferences.
Customization via Local Development (HubSpot CLI)
If you prefer to customize FreshJuice locally (on your machine), you can use the HubSpot CLI with FreshJuice build tools to make changes to the theme files.
Local Development process requires you to have Node.JS, git, HubSpot CLI, and jq installed on your machine.
- If you don't have
Node.JSinstalled, you can download it from here. - If you don't have
gitinstalled, you can download it from here. - If you don't have HubSpot CLI installed, you can install it by running
npm install -g @hubspot/clito install the HubSpot CLI globally. - If you don't have
jqinstalled, you can download it from here.
Note: Use Node v22.x.x or newer
Here's how you can get started with local customization:
- Clone the repo: Clone the FreshJuice theme repository to your local machine.
You can clone the repository using the following command:git clone [email protected]:freshjuice-dev/freshjuice-dev-hubspot-theme.git cd freshjuice-dev-hubspot-theme - Install dependencies: Run
npm installto install the required dependencies. This will install the necessary tools and libraries for local development. - Run
npm run prepareto prepare the theme for upload. This will install husky hooks. - Run
hs initto initialize the project.
Follow the instructions to authenticate your HubSpot account.
This action will create ahubspot.config.yamlfile in the root of your project. - (optional) If you do not have FreshJuice on your HubSpot account yet, run
npm run upload:hubspotto upload the theme to your HubSpot account. - Start local development: Run
npm run startto start the local development server. This will watch for changes in your source files and automatically compile and upload them to your HubSpot account. - Customize the theme:
- Make changes to the theme files in the
~/sourcedirectory. You can edit CSS, JavaScript. - Make changes to the HubL templates, modules, and sections in the
~/themedirectory.
- Make changes to the theme files in the
By customizing FreshJuice locally, you have more control over the development process and can get more Juice to your brand-new HubSpot theme.
Node commands are available:
npm run clean: Clean temporary directories.npm run fetch:hubspot: Fetch theme files from HubSpot.npm run upload:hubspot: Upload theme files to HubSpot.npm run watch:hubspot: Watch theme files changes and upload to HubSpot.npm run watch:tailwind: Watch Tailwind CSS changes.npm run build:tailwind: Build Tailwind CSS.npm run watch:js: Watch JS changes.npm run build:js: Build JS.npm run build:zip: Build theme and create ZIP file.npm run version:patch: Bump version patch.npm run version:minor: Bump version minor.npm run version:major: Bump version major.npm run start: Start local development. Watch Tailwind CSS, JS, and upload to HubSpot.npm run build: Build theme. Build Tailwind CSS, JS.npm run prepare: Prepare theme for upload. Install husky hooks.
Keep building with flavor. Visit the Knowledge Base to explore the FreshJuice Pro Theme and advanced modules.