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.
npm install
npx uj setup
npm start
npm start
in Terminal to get all the latest updates from the Ultimate Jekyll template and launch your website in the browser.url
in _config.yml
to your domain.npm run dist
in Terminal.--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
UJ_PURGECSS=true # Enables PurgeCSS to remove unused CSS (normally only happens in production builds)
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:
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
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
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:
src/assets/images/**/*.{jpg,jpeg,png}
uj-imagemin
branch (when using GitHub cache)npm install
npm run prepare:watch
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
You can add the following frontmatter to your pages to customize their behavior:
---
# 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:
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
member:
id: "member-id" # ID of the team member from _data/team.yml
name: "Member Name" # Name of the team member
---
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
authReturnUrl
: Redirects to this URL after authentication./account
)_test_subscription
: Override subscription data for testing (e.g., _test_subscription=premium
)_test_prefill=true
: Adds fake test data for development:/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
)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