Site | NPM Module | GitHub Repo

Ultimate Jekyll is a template that helps you jumpstart your Jekyll sites and is fueled by an intuitive incorporation of npm, gulp, and is fully SEO optimized and blazingly fast.

šŸ¦„ Features

  • SEO Optimized: Ultimate Jekyll is fully SEO optimized.
  • Blazingly Fast: Ultimate Jekyll is blazingly fast.
  • NPM & Gulp: Ultimate Jekyll is fueled by an intuitive incorporation of npm and gulp.

šŸš€ Getting started

  1. Create a repo from the Ultimate Jekyll template.
  2. Clone the repo to your local machine.
  3. Run these commands to get everything setup and sync'd!
    npm install
    npx uj setup
    npm start
    

šŸ“¦ How to sync with the template

  1. Simply run npm start in Terminal to get all the latest updates from the Ultimate Jekyll template and launch your website in the browser.

šŸŒŽ Publishing your website

  1. Change the url in _config.yml to your domain.
  2. Push your changes to GitHub using npm run dist in Terminal.

ā›³ļø Flags

  • --browser=false - Disables the browser from opening when running npm start.
    npm start -- --browser=false
    
  • --debug=true - Enables logging of extra information when running npm start.
    npm start -- --debug=true
    
  • --ujPluginDevMode=true - Enables the development mode for the Ultimate Jekyll Ruby plugin.
    npm start -- --ujPluginDevMode=true
    

Other ENV variables

UJ_PURGECSS=true # Enables PurgeCSS to remove unused CSS (normally only happens in production builds)

Running Specific Tasks

You can run specific tasks using the npm run gulp command with the appropriate task name.

Some of these require environment variables to be set and other tasks to be run first.

Here are some examples:

Run the audit task:

# Run the audit task
npx uj audit

# Run with a Lighthouse URL (defaults to "/" if not provided)
npx uj audit -- --lighthouseUrl="/contact"

# Add autoExit to continue developing and testing AFTER the audit
npx uj audit -- --lighthouseUrl="/contact" --autoExit=false

Run the translation task:

# Test translation with GitHub cache (requires GH_TOKEN and GITHUB_REPOSITORY)
GH_TOKEN=XXX \
GITHUB_REPOSITORY=XXX \
UJ_TRANSLATION_CACHE=true \
npx uj translation

# Test with only 1 file
UJ_TRANSLATION_ONLY="index.html" \
GH_TOKEN=XXX \
GITHUB_REPOSITORY=XXX \
UJ_TRANSLATION_CACHE=true \
npx uj translation

Run the imagemin task:

Test image optimization with GitHub cache in development mode:

# Test with GitHub cache (requires GH_TOKEN and GITHUB_REPOSITORY)
GH_TOKEN=XXX \
GITHUB_REPOSITORY=XXX \
UJ_IMAGEMIN_CACHE=true \
npx uj imagemin

# Or run locally without cache
npx uj imagemin

The imagemin task will:

  • Process images from src/assets/images/**/*.{jpg,jpeg,png}
  • Generate multiple sizes (1024px, 425px) and WebP formats
  • Cache processed images in uj-imagemin branch (when using GitHub cache)
  • Skip already processed images on subsequent runs

šŸ›  Developing

  1. Clone the repo to your local machine.
  2. Run these commands
    npm install
    npm run prepare:watch
    

Run the blogify task:

Create 12 test blog posts in the _posts directory with the blogify task. This is useful for testing and development purposes.

npx uj blogify

Page Frontmatter

You can add the following frontmatter to your pages to customize their behavior:

All pages

---
# Layout and Internals
layout: themes/[ site.theme.id ]/frontend/core/minimal # The layout to use for the page, usually 'default' or 'page'
permalink: /path/to/page # The URL path for the page, can be relative

# Control the page's meta tags
meta:
  index: true # Set to false to disable indexing by search engines
  title: 'Page Title' # Custom meta title for the page
  description: 'Page description goes here.' # Custom meta description for the page
  breadcrumb: '' # Custom breadcrumb for the page

# Control the page's theme and layout
theme:
  nav:
    enabled: true # Enable theme's nav on the page
  footer:
    enabled: true # Enable theme's footer on the page
  body:
    class: '' # Add custom classes to the body tag
    main:
      class: '' # Add custom classes to the main tag
  head:
    content: '' # Injected at the end of the head tag
  foot:
    content: '' # Injected at the end of the foot tag (inside <body>)
---

Post pages

---
# Post pages
post:
  title: "Post Title" # Custom post title for the page
  description: "Post description goes here." # Custom post description for the page
  author: "author-id" # ID of the author from _data/authors.yml
  id: 1689484669 # Unique ID for the post, used for permalink
---

Team Member pages

---
# Team Member pages
member:
  id: "member-id" # ID of the team member from _data/team.yml
  name: "Member Name" # Name of the team member
---

Special Class

uj-signin-btn: Automatically handles signin (just add data-provider="google.com" to the button) uj-signup-btn: Automatically handles signup (just add data-provider="google.com" to the button)

uj-language-dropdown: uj-language-dropdown-item

Special Query Parameters

Authentication

  • authReturnUrl: Redirects to this URL after authentication.

Testing Parameters

Account Page (/account)
  • _test_subscription: Override subscription data for testing (e.g., _test_subscription=premium)
  • _test_prefill=true: Adds fake test data for development:
    • Inserts fake referral data in the Referrals section
    • Inserts fake session data in the Security section (active sessions)
Checkout Page (/payment/checkout)
  • _test_appId: Override the application ID for testing (e.g., _test_appId=test-app)
  • _test_trialEligible: Force trial eligibility status:
    • _test_trialEligible=true: User is eligible for trial
    • _test_trialEligible=false: User is not eligible for trial
  • _test_cardProcessor: Force a specific payment processor for testing (e.g., _test_cardProcessor=stripe or _test_cardProcessor=paypal)

Icons

Webpack

Dev Flags

Add this to any js file to ONLY run in development mode (it will be excluded in production builds):

  /* @dev-only:start */
  {
    // Your development-only code goes here
  }
  /* @dev-only:end */

This project is "ultimate-jekyll", an NPM module that helps │ │ streamline development of Jekyll websites. A "consuming │ │ project" will require this NPM module to take advantage of │ │ its features like automatic folder structure setup, themes, │ │ and default pages to get a website up and running in │ │ seconds, while allowing further customization down the line. │ │ Right now i am struggling on the theme portion of this │ │ project. I want the user to be able to define the theme in │ │ their _config.yml (which currently they do by setting │ │ theme.id). I have some themes from the official bootstrap │ │ team. usually a theme comes with a frontend, a backend/admin │ │ dashboard, and docs. these 3 subparts of the theme have │ │ different html structure and css and js requirements. so i │ │ need a super easy system that allows me to make a file in │ │ the consuming project, say its the index.html for example, │ │ and i should easily be able to put which subseciton (or │ │ target as i call it) of the theme to use. so for an agency │ │ website i will probably use the frontend target, while for a │ │ chat app i will probably use the backend target. however, i │ │ need to be able to use