Skip to content

Deploying Chirpy

Chirpy is a feature-rich Jekyll theme designed specifically for technical blogs and content creators. With an elegant dark mode, responsive design, syntax highlighting for code snippets, category and tag organization, and built-in SEO optimization, Chirpy provides everything you need to create a professional technical blog. It’s ideal for developers, engineers, and technical writers who want a fast, secure, and easy-to-maintain blogging platform.

This guide will walk you through deploying Chirpy on Klutch.sh, a modern cloud platform that simplifies containerized application deployment. By the end of this guide, you’ll have a fully functional technical blog running on reliable infrastructure.

Why Deploy Chirpy on Klutch.sh?

Klutch.sh provides an excellent platform for hosting Chirpy:

  • Docker-native deployment - Klutch.sh automatically detects and deploys Dockerized applications
  • Lightning-fast static content - Serve pre-built pages with minimal latency
  • Custom domains - Use your own domain for your technical blog
  • Environment configuration - Manage build and runtime settings through the dashboard
  • Built-in HTTPS - Secure your blog with automatic SSL certificates
  • Simple updates - Push new content via GitHub and redeploy automatically
  • Zero maintenance - Focus on content creation, not infrastructure management

Prerequisites

Before deploying Chirpy on Klutch.sh, you’ll need:

  • A Klutch.sh account (sign up for free)
  • Access to the Klutch.sh dashboard
  • A GitHub repository with your Chirpy blog
  • Ruby 3.0 or higher (for local development)
  • Basic understanding of Jekyll and markdown
  • A custom domain (optional but recommended for branded blogs)

Deployment Steps

  1. Create a Dockerfile

    Create a Dockerfile in the root of your repository to containerize Chirpy:

    FROM ruby:3.2-alpine
    # Install system dependencies
    RUN apk add --no-cache \
    build-base \
    git \
    curl \
    nodejs \
    npm \
    bash
    # Set working directory
    WORKDIR /app
    # Copy Gemfile and Gemfile.lock
    COPY Gemfile Gemfile.lock ./
    # Install Ruby dependencies
    RUN bundle install --jobs 4 --retry 3
    # Copy application files
    COPY . .
    # Build the Jekyll site
    RUN bundle exec jekyll build
    # Install a lightweight web server
    RUN npm install -g http-server
    # Expose port
    EXPOSE 3000
    # Health check
    HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD curl -f http://localhost:3000/ || exit 1
    # Start the application
    CMD ["http-server", "_site", "-p", "3000", "-c-1"]
  2. Create Environment Configuration File

    Create a .env.example file to document environment variables for the Jekyll build:

    # Chirpy Blog Environment Configuration
    # Jekyll Build Settings
    JEKYLL_ENV=production
    JEKYLL_BASEURL=/
    JEKYLL_URL=https://example-app.klutch.sh
    # Site Configuration
    SITE_TITLE=My Technical Blog
    SITE_DESCRIPTION=A technical blog about software development
    SITE_AUTHOR=Your Name
    SITE_AVATAR=https://example-app.klutch.sh/assets/img/avatar.jpg
    # Social Media
    TWITTER_USERNAME=yourusername
    GITHUB_USERNAME=yourusername
    LINKEDIN_USERNAME=yourusername
    # Analytics (Optional)
    GOOGLE_ANALYTICS_ID=
    HOTJAR_ID=
    # Disqus Comments (Optional)
    DISQUS_ENABLED=false
    DISQUS_SHORTNAME=
    # Paginate Settings
    PAGINATE=10
    PAGINATE_PATH=/page:num/
    # Timezone
    TZ=UTC
    # Search Configuration
    USE_LUNR_SEARCH=true
    # Featured Tags
    FEATURED_TAGS_MAX=10
    # Archive Display
    SHOW_ARCHIVE_YEAR=true
    # Server Configuration
    PORT=3000
    HOST=0.0.0.0
    # Build Configuration
    JEKYLL_INCREMENTAL=false
    JEKYLL_STRICT_FRONT_MATTER=true
    # Permalink Structure
    PERMALINK=/:categories/:year/:month/:day/:title/
  3. Create _config.yml Configuration

    Create or update your _config.yml file for Jekyll configuration:

    # Chirpy Jekyll Configuration
    # Site Settings
    title: My Technical Blog
    tagline: A blog about software development
    description: >-
    A technical blog covering software development,
    programming tutorials, and tech insights.
    url: "https://example-app.klutch.sh"
    baseurl: ""
    lang: en
    timezone: UTC
    # Site Avatar and Image
    avatar: /assets/img/avatar.jpg
    avatar_dark: /assets/img/avatar-dark.jpg
    # Author Information
    author:
    name: Your Name
    email: your-email@example.com
    links:
    - https://twitter.com/yourusername
    - https://github.com/yourusername
    - https://linkedin.com/in/yourusername
    # Social Media Links
    social:
    name: Your Name
    email: your-email@example.com
    links:
    - https://twitter.com/yourusername
    - https://github.com/yourusername
    # Favicon
    favicon: /assets/img/favicon.ico
    # Permalink Structure
    permalink: /:categories/:year/:month/:day/:title/
    # Pagination
    paginate: 10
    paginate_path: /page:num/
    # Archives Display
    archives:
    enabled:
    - name: 'Categories'
    field: 'categories'
    - name: 'Tags'
    field: 'tags'
    # Collections
    collections:
    tabs:
    output: true
    sort_by: order
    # Defaults
    defaults:
    - scope:
    path: ''
    type: 'posts'
    values:
    layout: post
    comments: true
    toc: true
    categories: [Blog]
    tags: []
    - scope:
    path: '_drafts'
    values:
    comments: false
    - scope:
    path: ''
    type: 'tabs'
    values:
    layout: page
    # CDN Configuration
    cdn:
    jsdelivr: 'https://cdn.jsdelivr.net'
    # Markdown Processing
    markdown: kramdown
    highlighter: rouge
    # Markdown Options
    kramdown:
    input: GFM
    hard_wrap: false
    footnote_backlink: '↩︎'
    syntax_highlighter: rouge
    syntax_highlighter_opts:
    css_class: highlight
    # Rouge Syntax Highlighting
    rouge:
    css_class: highlight
    span:
    line_numbers: false
    block:
    line_numbers: true
    # Plugins
    plugins:
    - jekyll-paginate-v2
    - jekyll-include-cache
    - jekyll-feed
    - jekyll-archives
    - jekyll-seo-tag
    - jekyll-sitemap
    # Exclude from Processing
    exclude:
    - .git
    - .github
    - .gitignore
    - Gemfile
    - Gemfile.lock
    - docker-compose.yml
    - Dockerfile
    - .env
    - .env.example
    - node_modules
    - vendor/
    - .editorconfig
    # Include in Processing
    include:
    - .htaccess
    - .nojekyll
    # Build Settings
    keep_files:
    - .git
    - .gitignore
  4. Update Gemfile

    Create or update your Gemfile with required dependencies:

    source 'https://rubygems.org'
    # Jekyll and dependencies
    gem 'jekyll', '~> 4.3.0'
    gem 'jekyll-paginate-v2', '~> 3.0'
    gem 'jekyll-include-cache'
    gem 'jekyll-feed'
    gem 'jekyll-archives'
    gem 'jekyll-seo-tag'
    gem 'jekyll-sitemap'
    # Markdown and syntax highlighting
    gem 'kramdown'
    gem 'kramdown-parser-gfm'
    gem 'rouge'
    # Performance
    gem 'liquid-c'
    # Development dependencies
    group :development do
    gem 'bundler'
    gem 'wdm', '~> 0.1.1', :platforms => [:mingw, :x64_mingw, :mswin]
    gem 'webrick', '~> 1.8'
    end
    # Security
    gem 'rexml'

    After creating Gemfile, run:

    Terminal window
    bundle install
  5. Create Post Structure

    Create sample posts to verify deployment:

    Terminal window
    mkdir -p _posts _drafts _tabs

    Create a sample post at _posts/2024-01-01-welcome.md:

    ---
    title: Welcome to My Technical Blog
    date: 2024-01-01 12:00:00 +0000
    categories: [Blog, Welcome]
    tags: [jekyll, chirpy]
    pin: true
    ---
    # Welcome to Chirpy
    This is your first blog post. Here you can share your thoughts, tutorials, and insights about technology and development.
    ## Getting Started
    1. Create new posts in the `_posts` directory
    2. Use the format `YYYY-MM-DD-title.md`
    3. Add YAML front matter at the top of each post
    ## Features
    - **Dark Mode**: Automatic theme switching
    - **Responsive Design**: Works on all devices
    - **Code Highlighting**: Beautiful syntax highlighting
    - **Categories and Tags**: Organize your content
    - **Comments**: Built-in comment support
    Start writing and share your knowledge with the world!
  6. Create Docker Compose for Local Development

    Create a docker-compose.yml file for local development and testing (not used for Klutch.sh deployment):

    version: '3.8'
    services:
    chirpy:
    build: .
    container_name: chirpy-blog-dev
    ports:
    - "3000:3000"
    environment:
    - JEKYLL_ENV=development
    - JEKYLL_BASEURL=/
    - JEKYLL_URL=http://localhost:3000
    - SITE_TITLE=My Technical Blog
    - SITE_DESCRIPTION=A technical blog about software development
    volumes:
    - .:/app
    - bundle:/usr/local/bundle
    command: |
    sh -c 'bundle install && \
    bundle exec jekyll serve --host 0.0.0.0 --port 3000 --livereload'
    networks:
    - chirpy-network
    volumes:
    bundle:
    networks:
    chirpy-network:
    driver: bridge

    To run locally:

    Terminal window
    docker-compose up

    Then visit http://localhost:3000 in your browser.

  7. Create .gitignore File

    Create a .gitignore file to exclude build artifacts and dependencies:

    # Jekyll
    _site/
    .jekyll-cache/
    .jekyll-metadata
    # Ruby
    *.gem
    *.gemspec
    Gemfile.lock
    bundle/
    # Node.js
    node_modules/
    npm-debug.log
    yarn-error.log
    # Build artifacts
    dist/
    build/
    # Environment files
    .env
    .env.local
    .env.*.local
    # IDE
    .vscode/
    .idea/
    *.swp
    *.swo
    *~
    .DS_Store
    # OS
    .DS_Store
    Thumbs.db
    # Logs
    logs/
    *.log
    # Cache
    .cache/
    .turbo/
    # Temporary files
    temp/
    tmp/
    .tmp/
  8. Push Configuration to GitHub

    Push your repository to GitHub with all configuration files:

    Terminal window
    git add Dockerfile _config.yml Gemfile .env.example \
    docker-compose.yml .gitignore _posts/
    git commit -m "Initial Chirpy blog deployment configuration for Klutch.sh"
    git push origin main
  9. Deploy on Klutch.sh

    1. Navigate to klutch.sh/app and log in to your dashboard
    2. Click Create New App
    3. Connect your GitHub repository containing your Chirpy blog (the Dockerfile will be automatically detected)
    4. Configure your application settings:
      • Set your preferred app name
      • Review the detected Dockerfile configuration
      • Select a region for deployment
    5. Click Deploy to start the deployment process
    6. Monitor the deployment progress in the dashboard
    7. Wait for the deployment to complete and your blog to become active
  10. Configure Environment Variables

    1. In your app dashboard, navigate to Environment Variables section
    2. Add the configuration variables from your .env.example file:
      • JEKYLL_ENV: Set to production
      • JEKYLL_URL: Set to https://example-app.klutch.sh (or your custom domain)
      • SITE_TITLE: Your blog’s title
      • SITE_DESCRIPTION: Your blog’s description
      • SITE_AUTHOR: Your name
      • TWITTER_USERNAME: Your Twitter handle (optional)
      • GITHUB_USERNAME: Your GitHub username (optional)
      • LINKEDIN_USERNAME: Your LinkedIn username (optional)
      • GOOGLE_ANALYTICS_ID: Your analytics ID (optional)
    3. Click Save to apply the environment variables
    4. Your application will automatically rebuild and redeploy
  11. Configure Traffic Routes

    1. In your app dashboard, navigate to Traffic settings
    2. Select HTTP as the traffic type
    3. Set the internal port to 3000 (Chirpy web server default)
    4. Configure any custom domain settings if you have a domain
    5. Save your traffic configuration
  12. Deploy Your Blog

    Your Chirpy blog is now live! To update your blog with new content:

    1. Create new posts in the _posts directory with the format YYYY-MM-DD-title.md
    2. Add proper YAML front matter to each post
    3. Commit your changes to GitHub:
      Terminal window
      git add _posts/
      git commit -m "Add new blog post: Title"
      git push origin main
    4. Your blog will automatically rebuild and deploy on Klutch.sh

    Your blog will now be accessible at your configured domain or at example-app.klutch.sh.

Blog Post Structure and Best Practices

Creating Blog Posts

Each blog post should follow this structure:

---
title: Your Post Title
date: 2024-01-15 12:00:00 +0000
categories: [Category1, Category2]
tags: [tag1, tag2, tag3]
author: author_id
pin: false
toc: true
comments: true
---
# Post Content Here
Your content goes here...

Front Matter Fields

  • title: The post title (required)
  • date: Publication date in ISO 8601 format (required)
  • categories: Array of post categories (optional)
  • tags: Array of post tags (optional)
  • author: Author ID (optional)
  • pin: Pin post to top of blog (optional, default: false)
  • toc: Show table of contents (optional, default: true)
  • comments: Enable comments (optional, default: true)

Writing Tips

  • Use markdown formatting for easy content creation
  • Include code blocks with language specification for syntax highlighting
  • Add images to the assets/img/ directory and reference them
  • Use categories to organize posts by topic
  • Use tags for cross-cutting concerns
  • Pin important posts to the top
  • Write descriptive titles for SEO

Managing Your Blog

Adding Authors

Create an _data/authors.yml file:

author_id:
name: Author Name
twitter: twitter_username
email: author@example.com

Customizing Appearance

Edit _config.yml to customize:

  • Blog title and description
  • Author information
  • Social media links
  • Colors and theme (in _sass/ files)
  • Header logo and favicon

Enabling Comments

Chirpy supports multiple comment systems:

  1. Disqus: Set comments.active: disqus in _config.yml
  2. Giscus: Use GitHub discussions for comments
  3. Utterances: Lightweight comment system using GitHub issues

Adding Custom Pages

Create pages in the root directory:

---
layout: page
title: About
permalink: /about/
---
# About This Blog
Content about your blog and yourself.

Search and Discovery

Sitemap

Chirpy automatically generates a sitemap.xml for search engines. Ensure it’s submitted to:

RSS Feed

Your blog automatically generates an RSS feed at /feed.xml. Share this with:

  • RSS aggregators
  • Social media
  • Newsletter services

SEO Optimization

Chirpy includes built-in SEO features:

  • Meta tags and structured data
  • Automatic sitemap generation
  • Open Graph tags for social sharing
  • Schema.org markup for search engines

Search Console Setup

  1. Add your blog to Google Search Console
  2. Submit your sitemap at /sitemap.xml
  3. Monitor search performance and queries
  4. Fix any indexing issues

Deployment Best Practices

Keeping Content Safe

  • Commit regularly to GitHub
  • Use meaningful commit messages
  • Tag major releases or milestones
  • Consider automated backups of your GitHub repository

Performance Optimization

  • Optimize images before uploading (use tools like TinyPNG)
  • Use lazy loading for images
  • Minimize CSS and JavaScript (Chirpy does this automatically)
  • Cache static assets (handled by Klutch.sh)

Content Management

  • Plan your content calendar
  • Write in drafts before publishing
  • Schedule posts using the date field
  • Review posts before publishing for quality

Analytics and Monitoring

  • Set up Google Analytics for traffic insights
  • Monitor search console for SEO issues
  • Track popular posts and topics
  • Review reader engagement metrics

Troubleshooting Deployment Issues

Build Failures

Check the following:

  • Verify all Gems in Gemfile are compatible
  • Ensure _config.yml YAML is valid
  • Check for syntax errors in markdown files
  • Review deployment logs in the dashboard

Blog Not Displaying

Possible solutions:

  • Verify JEKYLL_URL environment variable is correct
  • Check that _site/ directory is being generated
  • Ensure Dockerfile is building Jekyll correctly
  • Review application logs for errors

Post Not Appearing

Steps to resolve:

  • Verify post filename format: YYYY-MM-DD-title.md
  • Check post date is not in the future
  • Ensure YAML front matter is valid
  • Verify post is in _posts/ directory

Performance Issues

Optimization steps:

  • Archive old posts to reduce build time
  • Optimize images and assets
  • Minimize plugin count
  • Use incremental builds for faster deployments

Advanced Configuration

Custom Domain Setup

To use a custom domain with your Chirpy blog:

  1. In your Klutch.sh dashboard, navigate to Domains
  2. Add your custom domain
  3. Follow the DNS configuration instructions
  4. Update your _config.yml:
    url: "https://your-domain.com"
  5. Save and redeploy your blog

Adding Custom Plugins

You can extend Chirpy with additional Jekyll plugins:

  1. Add plugins to your Gemfile
  2. Add plugins list to _config.yml
  3. Rebuild and deploy

Custom Styling

Create _sass/custom.scss to add custom CSS:

// Custom styling for your blog
.custom-class {
// Your styles here
}

Environment-Specific Configuration

Use different configurations for development and production:

Terminal window
# Development build
JEKYLL_ENV=development bundle exec jekyll build
# Production build
JEKYLL_ENV=production bundle exec jekyll build

Additional Resources

Learn more about Chirpy and Jekyll:

Conclusion

You now have a fully functional Chirpy blog running on Klutch.sh! Your technical blog is ready to share your knowledge with the world.

With the elegant design of Chirpy and the robust infrastructure of Klutch.sh, you have everything needed to run a professional technical blog. Remember to:

  • Write quality content consistently
  • Engage with your readers through comments
  • Monitor your blog’s performance and SEO
  • Keep Jekyll and plugins updated
  • Share your posts across social media

For additional support or questions about deploying Chirpy on Klutch.sh, refer to the documentation and community resources linked above.