- Use compiled regex for performance improvement (#2502)
# 4.4.0 (2021-06-17)
- Use compiled regex for performance improvement (#2502)
- Allow users to use Active Support 6.1
- Allow users to use Active Support 6.0 (#2462)
- Allow users to use Rack 2.2+ (#2460)
- Bump backports gemfile
- 4.x support for 3.0 (#2424)
- Travis -> Actions (#2427)
- Support TOML as a frontmatter or data format (#2405)
- Replace URI.escape with WEBrick::HTTPUtils.escape (#2383)
Fixes `warning: URI.escape is obsolete` warnings.
Similar to (#2312) and the fix 7c155c2
# 4.3.11 (2020-09-16)
- Fix: rack.rb:89: warning: URI.unescape is obsolete (#2312)
# 4.3.10 (2020-09-11)
- Bump version
# 4.3.9 (2020-09-10)
- Fix: build error using liquid (#2083)
# 4.3.8 (2020-08-13)
- Update kramdown to avoid CVE-2020-14001 in v4 (#2348)
# 4.3.7 (2020-05-28)
- Loosen activesupport dependence (#2327)
### What
Change the maximum version of activesupport required to be any 5.x version, bringing the dependency back inline prior to it being restricted in commit ea2115f3f87d6e881fe9517dc65735c96735faf3.
### Why
There is a vulnerability reported in activesupport that is fixed in version 5.2.4.3, which middleman-core does not allow to be used due to its `< 5.1` version requirement.
Prior to commit ea2115f3f87d6e881fe9517dc65735c96735faf3 any `5.x` version was allowed because the dependency was defined as `~> 5.0`, however in that commit that intended to loosen the minimum dependency it appears the maximum dependency was tightened. There is no explanation in the commit or its related PR (#1976) about this so it could have been an accident.
- Add empty image alt tag if alt text not specified (#2323)
Middleman's image_tag helper wraps the Padrino image_tag helper.
By default, the Padrino image_tag helper adds an alt tag based on the
image filename when one isn't explicitly set.
Alt text based on the filename is not helpful to users and therefore
bad for accessibility.
To avoid this, explicitly set an empty alt tag value before calling
Padrino's image_tag if the user hasn't specified a value.
# 4.3.6 (2020-02-21)
- Disable therubyracer
- Reset Content-Length header when rewriting (#2316)
- Add Ruby 2.7.0 to CI
# 4.3.5 (2019-08-10)
- Fix i18n with anchor v4 (#2287)
- apply fix from `fix-i18n-with-anchor` to 4.x branch
- also fix markdown anchors
- add tests for `i18n_link_to` and kramdown `:anchor`
- pass `&:to_sym` as an argument to `transform_keys!` instead of a block.
- Add `page_id` concept. Using the `id` key in frontmatter, proxy or page will set an ID on a resource which can be referenced by `url_for` and `link_to`.
- Allow looking for `Gemfile` when setting up a project to fail gracefully.
- Send correct exit code when external_pipeline fails during build.
- Fix error when customizing `layouts_dir`. (#1028)
- Fix collections (commands in loops) not being processed by `page` command. (#1226)
- Add rewrite_ignore option to asset_hash, asset_host, cache_buster & relative_assets. This proc let's you opt-out of the extension behavior on a per-path basis.
- gzip extension now compresses svgs by default
- Fix the `encoding` option.
- Fix relative paths on `image_tag` helper.
- Correctly exit with error code on failed `init`
- Fixed `asset_hash` when path has query string or #hashes
- Fix new extension template
- Don't parse frontmatter on ignored files.
- Fix displaying frontmatter on `/__middleman/sitemap`
- Add `skip_build_clean` config which when set to a block, will avoid removing non-generated paths from build, like .git (#1716)
- Minor performance improvements
- DRY-up config.rb-specific commands like `ignore` or `path`.
- Fix automatic images with absolute (or images dir missing) paths in markdown. Fixes (#1755)
- Fix asset_host in combination with Google Analytics snippet. (#1751)
- Show an error message when git CLI is not available. (#1765)
- Correctly show file names of GZIP'ed assets. (#1364)
- Build file output is now parallel-ized! Use `middleman build --no-parallel` to disable.
- Make template file extensions that get layouts by default configurable via `config[:extensions_with_layout]`
- Remove `=` from inline url matcher. This means paths in HTML attributes MUST be quoted. Fixes (#1780)
- Add `before_server`-hook to the preview server which is run before the Webrick server is started
- Add `-d` to `middleman server` to make it run as daemon
- Trigger "Possible File Change" events on files which share an output or template type with a changed file. Allows LiveReload to update on partial changes.
- Added `import_file SOURCE, TARGET` and `import_path SOURCE_FOLDER` to copy resources from outside the project in. Does NOT do file change watching. Perfect for `bower_components`.
- Removed ability to use JSON as frontmatter. Still allowed in data/ folder.
- Added YAML data postscript. Like frontmatter, but reversed. Attach content after the key/value data as a `:postscript` key to the data structure (if Hash).
- Add `resources` class method to extensions to allow simple string-based resource generation.
- rename `app.add_to_instance` to `Extension.expose_to_application` for adding extension-local methods to the shared app instance.
- rename `app.add_to_config_context` to `Extension.expose_to_config` for adding extension-local methods to the sandboxed scope of `config.rb`
- Add `Extension.expose_to_template`, which auto binds copies of extension-local methods into a Template context.
- Remove side-loading of CLI tasks from `tasks/`
- Add the option of naming `config.rb` as `middleman.rb`.
- Builder extracted from Thor. `after_build` hook now passes an instance of a Builder instead of the Thor CLI.
- New FileWatcher API.
- Remove the `partials_dir` setting. Partials should live next to content, or be addressed with absolute paths.
- Partials must be named with a leading underscore. `_my_snippet.html.erb`, not `my_snippet.html.erb`.
- Removed the `proxy` and `ignore` options for the `page` command in `config.rb`. Use the `proxy` and `ignore` commands instead of passing these options to `page`.
- The `page` command in `config.rb` can now be used to add data to the page via the `data` argument. It is accessed the same way as frontmatter data, via `current_resource.data`.
- Add support for `environments` with the `-e` CLI flag. Loads additional config from `environments/envname.rb`. Removed `development?` helper in favor of `environment?(:development)`. Added `server?` helper to differentiate between build and server mode.
- Removed `with_layout`. Use loops of `page` instead.
- Removed Queryable Sitemap API
- Removed `css_compressor` setting, use `activate :minify_css, :compressor =>` instead.
- Removed `js_compressor` setting, use `activate :minify_javascript, :compressor =>` instead.
- Removed ability to server folders of content statically (non-Middleman projects).
- Prevent local templates being loaded when \$HOME is not set
- Removed "Implied Extension feature"
- Remove 'upgrade' and 'install' CLI commands.
- Gemfile may be in a parent directory of your Middleman project root (where 'config.rb' is).
- All dependencies for your Middleman project must be expressed in `Gemfile` - Bundler is no longer optional.
- Asciidoc information now available with the `asciidoc` local, which is a normal hash.
- Remove `page` template local. Use `current_resource` instead.
- Dropped support for providing a block to `page`&`proxy`.
- Dropped support for instance variables inside templates.
- Moved all rendering into `TemplateRenderer` and `FileRenderer`
- Placed all template evaluation inside the `TemplateContext` class
- Remove deprecated `request` instance
- Remove old module-style extension support
- Placed all `config.rb` evaluation inside the `ConfigContext` class
- The preview server can now serve over HTTPS using the `--https` flag. It will use an automatic self-signed cert which can be overridden using `--ssl_certificate` and `--ssl_private_key`. These settings can also be set in `config.rb`