Compare commits

..

9 Commits

Author SHA1 Message Date
mariuslp
202df57131 docs: update wsl installation procedure (#9968)
This is a 🔦 documentation change.

## Summary

The install documentation for WSL offers to install Ruby through
BrightBox. However, BrightBox does not support Ubuntu Jammy (which is
the default for latest WSL builds). Instead, this commit just redirects
the WSL user to the Ubuntu installation procedure to avoid duplicate
documentation.
2026-04-22 09:49:27 -05:00
iBug
d68f76e160 fix: Run release-please workflow only in jekyll/jekyll repo (#9969)
This is a 🐛 bug fix.

## Summary

The `release-please.yml` workflow doesn't make sense in forked
repositories. Let's restrict its execution to jekyll/jekyll only.

I did not expect a "workflow failed" notification soon after catching up
with the upstream in my forked repo:

<img width="1542" height="961" alt="image"
src="https://github.com/user-attachments/assets/5049f2ca-1b1b-42b8-b6ea-4c91ce66a6c3"
/>
2026-04-22 08:50:23 -05:00
Matt Rogers
5cf05d7d09 feat!: Streamline the release process for Jekyll (#9760)
This is a 🙋 feature or enhancement. 
This is a 🔨 code refactoring. 

## Summary

Improve and streamline our release processes with some extra automation
and a bit more rigor around PRs/commits.

## Context

With Jekyll 4.4 released, and under the assumption that the next release
will indeed be 5.0, I think it makes a lot of sense to take some time
and evaluate our development practices and streamline the process of
shipping. We generally go a long time (four months between 4.3.4 and
4.4.0, two years between 4.3.0 and 4.4.0) between releases and this is
my attempt at trying to improve that. While this PR is currently
incomplete, if there's interest in going this direction, I'll make time
over the next few days to clean it up and get it ready to actually ship.

In order to do this, I'm relying on the
[`release-please`](https://github.com/googleapis/release-please-action)
action from Google to do the majority of the heavy lifting. Please read
the release-please README in order to learn how release-please works and
what it does. In order to make it easier to adopt release-please, I've
made two additional changes. ~~The first is to rename `History.markdown`
to `CHANGELOG.md` since that's what `release-please` works with out of
the box.~~ The other is to add two new github actions workflows to run
release-please and to enforce conventional commit conventions on PR
titles. Because we squash merge, the PR title becomes the commit message
and `release-please` uses the commit messages to know when to bump the
version number.

One potential caveat with this is that it may become harder to maintain
stable branches. My point of view on this is that we've done a
relatively poor job of maintaining them regardless and I think it's more
important to release often, even if we end up bumping major or minor
version numbers more frequently than before. My stance on this is that
version bumps have no inherent goodness or badness. They are a
communication mechanism. We should let go of having to wait a certain
amount of time to do major version bumps or avoid work because it would
cause a major version bump, for example.

### Process changes

The use of release-please means that we can stop using jekyllbot to do
the merges and update History.markdown for us, as release-please will
take care of that when we cut the release. We will also no longer need
labels on PRs as the use of conventional commits will explain exactly
what is changing.

The process for releasing becomes:
 - Merge the docs PR
 - Merge the automatically generated release-please PR, which will
trigger the workflows to do the tagging, releasing, gem publishing, etc.

### Remaining work to do:

- [x] Change the pull request settings to only allow squash merges, as
jekyllbot enforces this for us today.
- [x] ~Update the site publishing process to pull from `CHANGELOG.md`
instead of `History.markdown`~ No longer needed.
- [x] Integrate jekyllbot into release-please (the release-please PRs
will be made by jekyllbot). This allows actions to be triggered on the
release-please PRs.
 - [x] Test the workflows to make sure they generate a PR correctly.
 - [x] ~Integrate the release publishing workflow into release-please
when it creates a release.~ Happens automatically with the existing
workflows.
2026-04-17 13:38:58 -05:00
jekyllbot
08c22eefb3 Update history to reflect merge of #9960 [ci skip] 2026-04-14 10:56:52 -07:00
Waishnav
3ed83f6450 Add GitCMS to resources docs (#9960)
Merge pull request 9960
2026-04-14 10:56:50 -07:00
jekyllbot
ff0d4dd78d Update history to reflect merge of #9954 [ci skip] 2026-03-29 20:53:03 -07:00
Matt Rogers
65d534a701 build: fix broken CI on newer rubies (#9954)
Merge pull request 9954
2026-03-29 20:53:01 -07:00
jekyllbot
baab7bf785 Update history to reflect merge of #9925 [ci skip] 2026-03-11 08:39:49 -07:00
Mike Dalton
f07d4f77bc Allow configuring future metadata for individual collections (#9925)
Merge pull request 9925
2026-03-11 08:39:47 -07:00
18 changed files with 199 additions and 112 deletions

View File

@@ -183,6 +183,7 @@ jekyllized
jekylllayoutconcept
jekyllrb
jekyllthemes
jekyllup
jemoji
jmcglone
johnreilly

17
.github/release-please-config.json vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"pull-request-title-pattern": "chore: release 💎 ${version}",
"packages": {
".": {
"changelog-path": "History.markdown",
"release-type": "ruby",
"bump-minor-pre-major": false,
"bump-patch-for-minor-pre-major": false,
"draft": false,
"prerelease": false,
"include-component-in-tag": false,
"include-v-in-tag": true,
"version-file": "lib/jekyll/version.rb"
}
},
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
}

3
.github/release-please-manifest.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
".": "4.4.1"
}

View File

@@ -0,0 +1,50 @@
# This workflow checks to ensure that all PR titles conform to the conventional
# commit spec and use the correct type and scopes. The spec for conventional
# commits can be found at https://www.conventionalcommits.org and there is a
# nice cheatsheet in a github gist at
# https://gist.github.com/qoomon/5dfcdf8eec66a051ecd85625518cfd13
#
# The types in this workflow match the spec. The scopes are custom to
# Jekyll and can be changed if desired.
name: Conventional Commit Check
permissions:
pull-requests: read
on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]
branches:
- master
jobs:
commit_lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
perf
refactor
docs
style
test
chore
scopes: |
core
cli
commands
plugins
site
helpers
converters
filters
tags
drops
tests
docs
requireScope: false

44
.github/workflows/release-please.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: "Release, please!"
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
jobs:
release-please:
if: ${{ github.repository == 'jekyll/jekyll' }}
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Run Release Please
id: release
uses: googleapis/release-please-action@v4
with:
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
token: ${{ secrets.JEKYLLBOT_TOKEN }}
publish-gem:
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: Build and Publish Gem
uses: rubygems/release-gem@v1

View File

@@ -1,34 +0,0 @@
name: Release Gem
on:
push:
branches:
- master
- "*-stable"
paths:
- "lib/**/version.rb"
jobs:
release:
if: "github.repository_owner == 'jekyll'"
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
matrix:
ruby_version:
- 2.7
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Build and Publish Gem
uses: ashmaroli/release-gem@dist
with:
gemspec_name: jekyll
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}

View File

@@ -65,7 +65,7 @@ jobs:
steps:
- name: check-spelling
id: spelling
uses: check-spelling/check-spelling@v0.0.24
uses: check-spelling/check-spelling@v0.0.26
with:
# This workflow runs in response to both `push` and `pull_request`, if there's an open `pull_request` in the same repository
# for a given branch, there's no reason to spend resources checking both the `push` and the `pull_request`, so this flag tells

View File

@@ -20,16 +20,19 @@
* docs: Update contributor badge in README to include avatar height and limit parameters (#9912)
* Update WDM (0.1.1 → 0.2.0) in the Windows docs (#9897)
* Bump supported versions (#9923)
* Add GitCMS to resources docs (#9960)
### Development Fixes
* Improve readability of `post_url` tag (#9829)
* Fix flaky test that depends on current minute (#9889)
* build: fix broken CI on newer rubies (#9954)
### Minor Enhancements
* feat: Allowing post_url tag to receive liquid variables (#9776)
* Add .ruby-lsp to default excludes (#9914)
* Allow configuring future metadata for individual collections (#9925)
## 4.4.1 / 2025-01-29

View File

@@ -8,6 +8,7 @@ require "yaml"
$LOAD_PATH.unshift File.expand_path("lib", __dir__)
require "jekyll/version"
require "bundler/gem_tasks"
Dir.glob("rake/**.rake").each { |f| import f }
@@ -42,11 +43,15 @@ def gem_file
end
def normalize_bullets(markdown)
markdown.gsub(%r!\n\s{2}\*{1}!, "\n-")
# Normalize both old-style indented bullets (" *") and
# release-please-style non-indented bullets ("*") to "-"
markdown.gsub(%r!\n\s{0,2}\*{1}!, "\n-")
end
def linkify_prs(markdown)
markdown.gsub(%r!(?<\!&)#(\d+)!) do |word|
# Match bare PR references like #1234 but skip those already linkified
# by release-please as [#1234](url)
markdown.gsub(%r{(?<!&)(?<!\[)#(\d+)}) do |word|
"[#{word}]({{ site.repository }}/issues/#{word.delete("#")})"
end
end
@@ -60,8 +65,10 @@ def liquid_escape(markdown)
end
def custom_release_header_anchors(markdown)
header_regexp = %r!^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}!
section_regexp = %r!^### \w+ \w+$!
# Match old format: "X.Y.Z / YYYY-MM-DD"
# Match new release-please format: "[X.Y.Z](compare-url) (YYYY-MM-DD)"
header_regexp = %r!^(?:\[?)(\d{1,2})\.(\d{1,2})\.(\d{1,2})(?:\]\([^)]*\))? [\(/]\s?\d{4}-\d{2}-\d{2}\)?!
section_regexp = %r!^### \w[\w ]*$!
markdown.split(%r!^##\s!).map do |release_notes|
_, major, minor, patch = *release_notes.match(header_regexp)
release_notes
@@ -75,7 +82,8 @@ def slugify(header)
end
def remove_head_from_history(markdown)
index = markdown =~ %r!^##\s+\d+\.\d+\.\d+!
# Match both old format "## X.Y.Z" and release-please format "## [X.Y.Z]"
index = markdown =~ %r!^##\s+\[?\d+\.\d+\.\d+!
markdown[index..-1]
end

View File

@@ -124,6 +124,16 @@ You can link to the generated page using the `url` attribute:
```
{% endraw %}
## Future
You can configure a collection to show future items by setting the `future` metadata to `true` in the collection's configuration.
```yaml
collections:
staff_members:
future: true
```
## Permalinks
There are special [permalink variables for collections]({{ '/docs/permalinks/#collections' | relative_url }}) to

View File

@@ -45,37 +45,9 @@ You must have [Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/com
Make sure all your packages and repositories are up to date. Open a new Command Prompt or PowerShell window and type `bash`.
Your terminal should now be a Bash instance. Next, update your repository lists and packages:
Your terminal should now be a Bash instance. Then, [follow the installation procedure for Ubuntu](https://jekyllrb.com/docs/installation/ubuntu/).
```sh
sudo apt-get update -y && sudo apt-get upgrade -y
```
Next, install Ruby. To do this, let's use a repository from [BrightBox](https://www.brightbox.com/docs/ruby/ubuntu/),
which hosts optimized versions of Ruby for Ubuntu.
```sh
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.5 ruby2.5-dev build-essential dh-autoreconf
```
Next, update your Ruby gems:
```sh
gem update
```
Install Jekyll:
```sh
gem install jekyll bundler
```
{: .note .info}
No `sudo` here.
Check your Jekyll version:
Once this is done, check your Jekyll version:
```sh
jekyll -v

View File

@@ -44,6 +44,7 @@ Use a SaaS service as a backend for functionality on your Jekyll site
- [Contentful](https://github.com/contentful/jekyll-contentful-data-import): Content infrastructure for digital teams
- [TinaCMS.io](https://tina.io/): Tina is an open-source, Git-backed headless content management system (CMS) that empowers both developers and content creators to collaborate seamlessly on a single platform
- [Decap CMS](https://decapcms.org/): Decap CMS (formerly Netlify CMS) is an open source content management system for your Git workflow that enables you to provide editors with a friendly UI and intuitive workflows
- [GitCMS](https://gitcms.dev/): Built for markdown-first content sites with a friendly Notion-like interface, a structured editorial publishing workflow, and MCP support which turns ChatGPT/Claude into content agent.
- [Siteleaf](https://www.siteleaf.com/): Built for developers, Loved by everyone
- [Kentico Kontent](https://rubygems.org/gems/kontent-jekyll/): A headless CMS with full control over content presentation

View File

@@ -11,7 +11,10 @@ module Jekyll
end
def hidden_in_the_future?(thing)
thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i
thing.respond_to?(:date) &&
!@site.future &&
!collection_allows_future?(thing) &&
thing.date.to_i > @site.time.to_i
end
private
@@ -19,5 +22,9 @@ module Jekyll
def can_be_published?(thing)
thing.data.fetch("published", true) || @site.unpublished
end
def collection_allows_future?(thing)
thing.respond_to?(:collection) && !!thing.collection.metadata["future"]
end
end
end

View File

@@ -1,30 +0,0 @@
# frozen_string_literal: true
#############################################################################
#
# Packaging tasks
#
#############################################################################
desc "Release #{name} v#{version}"
task :release => :build do
current_branch = `git branch`.to_s.strip.match(%r!^\* (.+)$!)[1]
unless current_branch == "master" || current_branch.end_with?("-stable")
puts "You must be on the master branch to release!"
exit!
end
sh "git commit --allow-empty -m 'Release :gem: #{version}'"
sh "git tag v#{version}"
sh "git push origin #{current_branch}"
sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem"
puts "Do not forget to build and release the docs gem as well."
puts "https://github.com/jekyll/jekyll-docs#releasing"
end
desc "Build #{name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{gemspec_file}"
sh "mv #{gem_file} pkg"
end

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# If you send us a ruby then we use that, if you do not then we test with
# whatever we can detect, this way you can run both suites when you test out

View File

@@ -35,16 +35,9 @@ else
fi
# Tests only pass when timezone offset is zero.
TZ=UTC
export TZ=UTC
for ruby in $rubies; do
if [[ "$ruby" == "jruby" ]]
then
testopts=""
else
testopts="--profile"
fi
if [[ $# -lt 1 ]]
then
set -x
@@ -53,6 +46,6 @@ for ruby in $rubies; do
else
set -x
time $ruby -S bundle exec ruby -I test \
"$@" $testops
"$@" $testopts
fi
done

View File

@@ -64,7 +64,7 @@ class TestPageWithoutAFile < JekyllUnitTest
assert_equal "All the properties.\n", regular_page["content"]
assert_equal "properties.html", regular_page["name"]
basic_attrs = %w(dir name path url excerpt)
basic_attrs = %w(dir name path url)
attrs = {
"content" => nil,
"dir" => "/",

42
test/test_publisher.rb Normal file
View File

@@ -0,0 +1,42 @@
# frozen_string_literal: true
require "helper"
class TestPublisher < JekyllUnitTest
context "default configuration" do
setup do
site = fixture_site
collection = Jekyll::Collection.new(site, "methods")
@thing = Jekyll::Document.new(
source_dir("methods/method.md"),
:site => site,
:collection => collection
)
@thing.data["date"] = (Time.now + (60 * 60 * 24)).to_i # tomorrow
@publisher = Jekyll::Publisher.new(site)
end
should "be hidden in the future" do
assert @publisher.hidden_in_the_future?(@thing)
end
end
context "when a thing's collection is configured to show future posts" do
setup do
site = fixture_site
collection = Jekyll::Collection.new(site, "methods")
collection.metadata["future"] = true
@thing = Jekyll::Document.new(
source_dir("methods/method.md"),
:site => site,
:collection => collection
)
@thing.data["date"] = (Time.now + (60 * 60 * 24)).to_i # tomorrow
@publisher = Jekyll::Publisher.new(site)
end
should "not be hidden in the future" do
refute @publisher.hidden_in_the_future?(@thing)
end
end
end