Every component package includes an automated installation script that handles the setup for you.
Installing an Individual Component
After downloading a component package, navigate to your Metalsmith project root directory (where your package.json file is located), extract the package there, and run the install script:
cd /path/to/your/metalsmith-project
unzip ~/Downloads/hero.zip
cd hero
./install.sh
Important:Always extract component packages in your project root directory. The install script needs to be run from within the extracted component folder, but it will copy files to the correct locations (lib/layouts/components/sections/ or lib/layouts/components/_partials/) in your project.
After installation completes successfully, you can safely delete the extracted component folder (e.g., hero/) and the downloaded ZIP file.
The installation script will:
- Verify you're in a Metalsmith project directory
- Check for existing installations and compare versions
- Validate that required dependencies are installed
- Copy component files to the correct locations
- Report any missing dependencies with download links
Example Installation Output
🔧 Installing hero v0.0.1...
Checking dependencies...
âš Warning: Missing required partials:
• text
• ctas
• image
Download from: https://metalsmith-components.netlify.app/downloads/
Continue installation anyway? (y/n)
If you proceed, the component files will be installed even if dependencies are missing. You can download the required partials later.
Installing the Complete Bundle
The bundle includes a master installation script with two modes:full installandupdate-only.
Full Install (Default)
Install all components or update your existing subset:
cd /path/to/your/metalsmith-project
unzip ~/Downloads/metalsmith-components.zip
cp metalsmith-components/metalsmith-components.config.json .
./metalsmith-components/install-all.sh
Important:Always run the install script from your project root directory. The script will automatically find the extracted components and install them to the correct locations based on your configuration.
If you already have components installed, the script will prompt you to choose:
- Install all components- Adds new components, updates existing ones (52 total)
- Update existing components only- Only updates components you already have (skips new ones)
Update-Only Mode
Only update components you're already using:
./metalsmith-components/install-all.sh --update-only
./metalsmith-components/install-all.sh -u
This mode is perfect for:
- Getting updates for the specific components you use
- Avoiding bloat from components you don't need
- Quick updates when new versions are released
The update-only mode detects installed components by checking for manifest.json files. Only components with matching names will be updated. For example, if you're using theMetalsmith2025 Structured Content Starter, approximately 22 components will be detected and updated.
Note: The bundle includes a sample metalsmith-components.config.json file. Copy it to your project root before installation if you want to customize where components are installed.
The install script automatically:
- Installs all partials first (resolving dependencies)
- Then installs all sections
- Reports which components were installed/updated and which were skipped
- Provides a summary of the installation
After installation completes, you can clean up:
rm -rf metalsmith-components
rm ~/Downloads/metalsmith-components.zip