Skip to content

Commit

Permalink
fix fast refresh not working for Liquid templates (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredcwhite authored Nov 2, 2024
1 parent 9e197e0 commit d19c9e2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def fast_refresh(paths = [], reload_if_needed: false) # rubocop:todo Metrics
self, layout.instance_variable_get(:@base), layout.name
)
end
liquid_renderer.reset unless layouts_to_reload.empty?
next unless res || !pages.empty?

unless pages.empty?
Expand Down Expand Up @@ -60,6 +59,7 @@ def fast_refresh(paths = [], reload_if_needed: false) # rubocop:todo Metrics

Bridgetown::Hooks.trigger :site, :fast_refresh, self

liquid_renderer.reset
transform_resources_for_fast_refresh(marked_resources, found_gen_pages)
transform_generated_pages_for_fast_refresh

Expand Down
3 changes: 1 addition & 2 deletions bridgetown-website/src/_docs/configuration/initializers.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,7 @@ config.inflector.configure do |inflections|
end
```

Bridgetown's inflector is based on `Dry::Inflector`, so you can [read up on how to add inflection
rules here](https://dry-rb.org/gems/dry-inflector/1.0/#custom-inflection-rules).
Bridgetown's inflector is based on `Dry::Inflector`, so you can [read up on how to add inflection rules here](https://dry-rb.org/gems/dry-inflector/1.0/#custom-inflection-rules).

### Parse Roda Routes

Expand Down
2 changes: 1 addition & 1 deletion bridgetown-website/src/_docs/installation/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Bridgetown v2 has removed a number of dependencies in the codebase on the Active

### Caveats with Fast Refresh in Development ⏩

Bridgetown v2 comes with a "fast refresh" feature by default. This rebuilds only files needed to display updated content in source files, rather than the entire website from scratch. However, certain features aren't yet compatible with fast refresh—most notabily, **i18n**. If you're using multiple locales in your project, you will likely want to disable fast refresh so you don't end up with broken pages/links by setting `fast_refresh` to `false` in your config.
Bridgetown v2 comes with a "fast refresh" feature by default. This rebuilds only files needed to display updated content in source files, rather than the entire website from scratch. However, certain features aren't yet compatible with fast refresh—most notabily, **i18n**. If you're using multiple locales in your project, you will likely want to disable fast refresh so you don't end up with broken pages/links by setting `fast_refresh false` in `config/initializers.rb`.

### Quick Search and Other Plugins 🔍

Expand Down

0 comments on commit d19c9e2

Please sign in to comment.