Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Incremental regeneration #112

Open
1 of 3 tasks
yosymfony opened this issue Nov 23, 2017 · 0 comments
Open
1 of 3 tasks

[Proposal] Incremental regeneration #112

yosymfony opened this issue Nov 23, 2017 · 0 comments
Assignees

Comments

@yosymfony
Copy link
Member

yosymfony commented Nov 23, 2017

Incremental regeneration helps shorten build times by only generating pages that were updated since the previous build. This first approach will be very simple and only regenerate a page if this one is changed.

Incremental regeneration can be enabled via the --incremental option in site:build command or by setting incremental: true in the configuration file of a site.

CLI examples:

spress site:build --incremental
spress site:build --server --incremental
spress site:build --server --watch --incremental

There will be a file called .metadata at the site root for keeping track of both file modification times and inter-document dependencies.

Limitations

  • The config.yml file is excluded on this mode.
  • The generators are excluded on this mode.

Tasks

  • Save and read site metadata from a file called spress.metadata placed at site root.
  • Manage the dependencies of an item (page) only considering the layout used by it.
  • Modify the class FilesystemDataSource to recover only the modified files when the incremental mode is on.

Deal with: #97.

@yosymfony yosymfony self-assigned this Nov 23, 2017
yosymfony added a commit that referenced this issue Dec 21, 2017
@yosymfony yosymfony removed the 2.3 label May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant