Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- **Liquid Engine**: Updated liquid template engine from v1.6.0 to v1.8.0. This brings Unicode identifier support, `LaxFilters` option, date timestamp support, and Jekyll-specific extensions including dot notation in assign tags.

### Added

- **Table of Contents (TOC) Support** (#76, #62): Added Kramdown-style TOC generation with `{:toc}` and `{::toc}` markers, including support for Jekyll's `toc_levels` configuration and heading exclusion with `{:.no_toc}`. Thanks [@tekknolagi](https://github.com/tekknolagi) for requesting
- **Math Support** (#110): Added MathJax/KaTeX compatibility for mathematical expressions using `$$...$$` delimiters, compatible with Jekyll/kramdown syntax
- **`jekyll-relative-links` Plugin** (#104, #25): Converts relative markdown links to their rendered equivalents
- **`jekyll-readme-index` Plugin** (#106, #29): Remaps README files to index pages
- **`jekyll-gist` Noscript** (#105, #27): Added `noscript` option for the `jekyll-gist` plugin
- **`--baseurl` and `--config` CLI Flags** (#103, #17, #18): Added support for `--baseurl` to override the site base URL and `--config` to specify alternate config files
- **`sassify` Filter** (#109): Implemented the `sassify` Liquid filter for converting indented Sass syntax to CSS
- **Table of Contents (TOC) Support** (#76, #101, #62): Added Kramdown-style TOC generation with `{:toc}` and `{::toc}` markers, including support for Jekyll's `toc_levels` configuration and heading exclusion with `{:.no_toc}`. Thanks [@tekknolagi](https://github.com/tekknolagi) for requesting
- **Permalink Timezone Configuration** (#67): Added `permalink_timezone` configuration option to control timezone for permalink date generation
- **Markdown Attributes Support** (#85, #64): Added support for full Kramdown markdown attribute syntax (`markdown=1`, `markdown=0`, `markdown=block`, `markdown=span`) in HTML blocks

### Fixed

- **`page.date` for Non-Posts** (#116, #115): `page.date` is now only defined for posts and collection documents, or when explicitly set in frontmatter; previously it was unconditionally set to the file modification time. Thanks [@sampsyo](https://github.com/sampsyo) for reporting
- **Indented HTML Rendered as Code** (#117, #113): Fixed indented HTML block-level elements inside list items being erroneously rendered as code blocks after the switch to Goldmark. Thanks [@tekknolagi](https://github.com/tekknolagi) for reporting
- **`{:.no_toc}` Paragraphs** (#112): Fixed `{:.no_toc}` attribute markers being left as visible paragraphs in the HTML output instead of being removed
- **Sass Error Handling** (#99, #95): Fixed "connection is shut down" error when compiling SCSS by using a global singleton for the Sass transpiler; added helpful error message when wrong Sass package is installed
- **TOC List Replacement** (#93, #89): Fixed TOC to replace adjacent lists correctly, matching Jekyll's exact behavior. Thanks [@tekknolagi](https://github.com/tekknolagi) for reporting
- **SCSS Compilation Error** (#92, #90): Fixed "connection is shut down" error when compiling SCSS. Thanks [@tekknolagi](https://github.com/tekknolagi) for reporting
- **Custom Permalink Handling** (#82, #81): Fixed issue where `index.md` was not being rendered when custom permalink patterns were set in `_config.yml`. Custom permalink patterns now only apply to posts, not pages. Thanks [@tekknolagi](https://github.com/tekknolagi) for reporting
Expand All @@ -26,19 +40,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **URL Routing** (#74, #52): Fixed server to correctly handle URLs without trailing slashes for directory-style permalinks. Thanks [@abhijeetbodas2001](https://github.com/abhijeetbodas2001) for reporting
- **Layout Handling** (#78): Fixed pages with `layout: none` or `layout: null` in front matter to skip layout rendering instead of causing errors
- **First Build Crash**: Fixed Clean function crash when destination directory doesn't exist on first run
- **Windows Routing**: Fixed URL routing on Windows by using forward slashes consistently in path handling
- **Windows Support** (#96): Fixed URL routing, path handling, and test failures on Windows
- **Nested Directory Watching**: Fixed file watcher to recursively watch nested directories and detect changes in subdirectories
- **Config Updates**: Fixed `Config.Set` to properly update YAML MapSlice so template changes are observed correctly

### Changed

- **Error Handling** (#97): Replaced `log.Fatal` calls with `panic` and `fmt.Errorf` for proper error propagation
- **Logging System** (#75, #35): Replaced scattered `fmt.Printf` statements with centralized logging package supporting proper log levels (Debug, Info, Warning, Error) and quiet mode
- **File Watcher**: Improved file watcher with automatic fallback to polling when directory count exceeds 500, preventing file descriptor exhaustion on large sites
- **Error Messages**: Enhanced markdown renderer error messages for common issues (e.g., suggesting `<br/>` instead of `<br>`)

### Maintenance

- **GitHub Actions** (#87): Updated CI workflows to test on Ubuntu, macOS, and Windows; updated actions to latest versions; added golangci-lint configuration
- **Go 1.25/1.26** (#119): Updated CI to test against Go 1.25 and 1.26; updated minimum Go version to 1.25
- **golangci-lint v2** (#108): Updated golangci-lint configuration for v2
- **GitHub Actions** (#87): Updated CI workflows to test on Ubuntu, macOS, and Windows; updated actions to latest versions
- **Tests** (#102): Added tests for `jekyll-default-layout` plugin
- **Code Quality**: Fixed lint issues, ran go fmt for consistent formatting
- **Documentation**: Improved documentation structure and clarity, added configuration documentation
- **.gitignore**: Updated to exclude Go build cache and macOS-specific files
Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Gojekyll

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-8-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-15-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![go badge][go-svg]][go-url]
Expand Down Expand Up @@ -243,15 +243,24 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<table>
<tr>
<td align="center"><a href="https://code.osteele.com/"><img src="https://avatars.githubusercontent.com/u/674?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Oliver Steele</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=osteele" title="Code">💻</a> <a href="#design-osteele" title="Design">🎨</a> <a href="https://github.com/osteele/gojekyll/commits?author=osteele" title="Documentation">📖</a> <a href="#ideas-osteele" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-osteele" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-osteele" title="Maintenance">🚧</a> <a href="#projectManagement-osteele" title="Project Management">📆</a> <a href="https://github.com/osteele/gojekyll/pulls?q=is%3Apr+reviewed-by%3Aosteele" title="Reviewed Pull Requests">👀</a> <a href="https://github.com/osteele/gojekyll/commits?author=osteele" title="Tests">⚠️</a></td>
<td align="center"><a href="https://bep.is/"><img src="https://avatars.githubusercontent.com/u/394382?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bjørn Erik Pedersen</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=bep" title="Documentation">📖</a></td>
<td align="center"><a href="https://tqdev.com/"><img src="https://avatars.githubusercontent.com/u/1288217?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maurits van der Schee</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=mevdschee" title="Code">💻</a></td>
<td align="center"><a href="https://daniil.it/"><img src="https://avatars.githubusercontent.com/u/7339644?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Daniil Gentili</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=danog" title="Code">💻</a></td>
<td align="center"><a href="http://cameronelliott.com/"><img src="https://avatars.githubusercontent.com/u/868689?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cameron Elliott</b></sub></a><br /><a href="#ideas-cameronelliott" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/sirwart"><img src="https://avatars.githubusercontent.com/u/830101?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Brian Smith</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=sirwart" title="Code">💻</a></td>
<td align="center"><a href="https://chimbori.com/"><img src="https://avatars.githubusercontent.com/u/24304662?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chimbori</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=chimbori" title="Code">💻</a></td>
<td align="center"><a href="https://chimbori.com/"><img src="https://avatars.githubusercontent.com/u/24304662?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chimbori</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=chimbori" title="Code">💻</a> <a href="https://github.com/osteele/gojekyll/issues?q=author%3Achimbori" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://tqdev.com/"><img src="https://avatars.githubusercontent.com/u/1288217?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Maurits van der Schee</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=mevdschee" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/MikeCongdon1"><img src="https://avatars.githubusercontent.com/u/11522648?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mike Congdon</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=MikeCongdon1" title="Code">💻</a> <a href="https://github.com/osteele/gojekyll/issues?q=author%3AMikeCongdon1" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://bep.is/"><img src="https://avatars.githubusercontent.com/u/394382?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bjørn Erik Pedersen</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/commits?author=bep" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://bernsteinbear.com/"><img src="https://avatars.githubusercontent.com/u/401167?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Max Bernstein</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Atekknolagi" title="Bug reports">🐛</a> <a href="#ideas-tekknolagi" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://www.cs.cornell.edu/~asampson/"><img src="https://avatars.githubusercontent.com/u/188033?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adrian Sampson</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Asampsyo" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/yuqianyi1001"><img src="https://avatars.githubusercontent.com/u/52897651?v=4?s=100" width="100px;" alt=""/><br /><sub><b>愚千一</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Ayuqianyi1001" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://cameronelliott.com/"><img src="https://avatars.githubusercontent.com/u/868689?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cameron Elliott</b></sub></a><br /><a href="#ideas-cameronelliott" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/manastungare"><img src="https://avatars.githubusercontent.com/u/343845?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manas Tungare</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Amanastungare" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/edgan"><img src="https://avatars.githubusercontent.com/u/3506737?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nathan Grennan</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Aedgan" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/abhijeetbodas2001"><img src="https://avatars.githubusercontent.com/u/55339528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Abhijeet Bodas</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Aabhijeetbodas2001" title="Bug reports">🐛</a></td>
</tr>
<tr>
<td align="center"><a href="https://bernsteinbear.com/"><img src="https://avatars.githubusercontent.com/u/401167?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Max Bernstein</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Atekknolagi" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/train860"><img src="https://avatars.githubusercontent.com/u/6874537?v=4?s=100" width="100px;" alt=""/><br /><sub><b>train860</b></sub></a><br /><a href="https://github.com/osteele/gojekyll/issues?q=author%3Atrain860" title="Bug reports">🐛</a></td>
</tr>
</table>

Expand Down
8 changes: 8 additions & 0 deletions commands/testdata/site/assign-dot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: code
---

# Assign Dot Notation

{% assign my_obj.custom_var = "hello" %}
{{ my_obj.custom_var }}
8 changes: 3 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/osteele/gojekyll

go 1.24.0

toolchain go1.24.3
go 1.25.0

require (
github.com/alecthomas/chroma v0.10.0
Expand All @@ -16,7 +14,7 @@ require (
github.com/k0kubun/pp v3.0.1+incompatible
github.com/kyokomi/emoji v2.2.4+incompatible
github.com/montanaflynn/stats v0.7.1
github.com/osteele/liquid v1.6.0
github.com/osteele/liquid v1.8.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/radovskyb/watcher v1.0.7
github.com/stretchr/testify v1.11.1
Expand Down Expand Up @@ -164,7 +162,7 @@ require (
github.com/nishanths/exhaustive v0.12.0 // indirect
github.com/nishanths/predeclared v0.2.2 // indirect
github.com/nunnatsa/ginkgolinter v0.21.2 // indirect
github.com/osteele/tuesday v1.0.3 // indirect
github.com/osteele/tuesday v1.0.4 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,10 @@ github.com/onsi/ginkgo/v2 v2.26.0 h1:1J4Wut1IlYZNEAWIV3ALrT9NfiaGW2cDCJQSFQMs/gE
github.com/onsi/ginkgo/v2 v2.26.0/go.mod h1:qhEywmzWTBUY88kfO0BRvX4py7scov9yR+Az2oavUzw=
github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A=
github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k=
github.com/osteele/liquid v1.6.0 h1:bTsbZjPIr7F+pU+K6o//Y5//W4McMzvUlMXWGOVvpc0=
github.com/osteele/liquid v1.6.0/go.mod h1:xU0Z2dn2hOQIEFEWNmeltOmCtfhtoW/2fCyiNQeNG+U=
github.com/osteele/tuesday v1.0.3 h1:SrCmo6sWwSgnvs1bivmXLvD7Ko9+aJvvkmDjB5G4FTU=
github.com/osteele/tuesday v1.0.3/go.mod h1:pREKpE+L03UFuR+hiznj3q7j3qB1rUZ4XfKejwWFF2M=
github.com/osteele/liquid v1.8.0 h1:RAsJLPgNEXJM5D8dzQ2j2TKf2LCb77HWPLvYUHe2Rm8=
github.com/osteele/liquid v1.8.0/go.mod h1:SFqQ9ddbCoKceuG6RckCLJ0hcxUbGhLpvcXJGmHlCWA=
github.com/osteele/tuesday v1.0.4 h1:iX0xOLW08/FJtXUCr20ngYwOwBE6l/mf7mz8NIv4yl8=
github.com/osteele/tuesday v1.0.4/go.mod h1:5fgEemYhErJF09RNEwU+PdYiwm5Ar7Bknlhs1CD/Ol8=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
Expand Down
1 change: 1 addition & 0 deletions renderers/renderers.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ func (p *Manager) makeLiquidEngine() *liquid.Engine {
dirs = append(dirs, filepath.Join(p.ThemeDir, "_includes"))
}
engine := liquid.NewEngine()
engine.EnableJekyllExtensions()
filters.AddJekyllFilters(engine, &p.cfg)
tags.AddJekyllTags(engine, &p.cfg, dirs, p.RelativeFilenameToURL)
return engine
Expand Down