diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ce17ff..10e9ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 `
` instead of `
`) ### 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 diff --git a/README.md b/README.md index 1b8fdf1..732758a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Gojekyll -[![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-) [![go badge][go-svg]][go-url] @@ -243,15 +243,24 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d - - - - + + + + + + + + + + + + + - +

Oliver Steele

πŸ’» 🎨 πŸ“– πŸ€” πŸš‡ 🚧 πŸ“† πŸ‘€ ⚠️

BjΓΈrn Erik Pedersen

πŸ“–

Maurits van der Schee

πŸ’»

Daniil Gentili

πŸ’»

Cameron Elliott

πŸ€”

Brian Smith

πŸ’»

Chimbori

πŸ’»

Chimbori

πŸ’» πŸ›

Maurits van der Schee

πŸ’»

Mike Congdon

πŸ’» πŸ›

BjΓΈrn Erik Pedersen

πŸ“–

Max Bernstein

πŸ› πŸ€”

Adrian Sampson

πŸ›

ζ„šεƒδΈ€

πŸ›

Cameron Elliott

πŸ€”

Manas Tungare

πŸ›

Nathan Grennan

πŸ›

Abhijeet Bodas

πŸ›

Max Bernstein

πŸ›

train860

πŸ›
diff --git a/commands/testdata/site/assign-dot.md b/commands/testdata/site/assign-dot.md new file mode 100644 index 0000000..8d52171 --- /dev/null +++ b/commands/testdata/site/assign-dot.md @@ -0,0 +1,8 @@ +--- +layout: code +--- + +# Assign Dot Notation + +{% assign my_obj.custom_var = "hello" %} +{{ my_obj.custom_var }} diff --git a/go.mod b/go.mod index b5b16ef..fd826d4 100644 --- a/go.mod +++ b/go.mod @@ -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 @@ -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 @@ -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 diff --git a/go.sum b/go.sum index d9df656..008baee 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/renderers/renderers.go b/renderers/renderers.go index 92d1cbd..a779be4 100644 --- a/renderers/renderers.go +++ b/renderers/renderers.go @@ -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