Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Mar 29, 2021
1 parent 85d6221 commit 6a605d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [0.16.5] - 2021-03-29
### Fixed
- Undo the change "only rebuild the site if it's needed" due regression issues.

## [0.16.4] - 2021-03-28
### Added
- Allow to define a function as a `permalink` to generate it dynamically.
Expand Down Expand Up @@ -501,6 +505,7 @@ First version
[#41]: https://github.com/oscarotero/lume/issues/41
[#43]: https://github.com/oscarotero/lume/issues/43

[0.16.5]: https://github.com/oscarotero/lume/compare/v0.16.4...v0.16.5
[0.16.4]: https://github.com/oscarotero/lume/compare/v0.16.3...v0.16.4
[0.16.3]: https://github.com/oscarotero/lume/compare/v0.16.2...v0.16.3
[0.16.2]: https://github.com/oscarotero/lume/compare/v0.16.1...v0.16.2
Expand Down
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as build from "./cli/build.js";
import * as run from "./cli/run.js";
import { error as printError } from "./utils.js";

export const version = "v0.16.4";
export const version = "v0.16.5";

const HELP = `
Docs: https://lumeland.github.io/
Expand Down
9 changes: 1 addition & 8 deletions site.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ export default class Site {
async update(files) {
await this.dispatchEvent({ type: "beforeUpdate", files });

let rebuildIsNeeded = false;

for (const file of files) {
// It's an ignored file
if (this.source.isIgnored(file)) {
Expand All @@ -244,7 +242,6 @@ export default class Site {
// It's inside a _data file or folder
if (normalized.includes("/_data/") || normalized.match(/\/_data.\w+$/)) {
await this.source.loadFile(file);
rebuildIsNeeded = true;
continue;
}

Expand All @@ -265,13 +262,9 @@ export default class Site {

// Default
await this.source.loadFile(file);
rebuildIsNeeded = true;
}

if (rebuildIsNeeded) {
await this.#buildPages();
}

await this.#buildPages();
await this.dispatchEvent({ type: "afterUpdate", files });
}

Expand Down

0 comments on commit 6a605d1

Please sign in to comment.