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

Partial rebuild processes files that should be ignored #3325

Closed
xofyarg opened this Issue Apr 11, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@xofyarg
Contributor

xofyarg commented Apr 11, 2017

In hugo v0.20, when doing partial rebuild, e.g. hugo -w, file list containing changed files does not honor the behavior of full rebuild. Files matching ignoreFiles config setting or directories will be proceed by hugo.

$ cat config.yaml
baseurl: "http://127.0.0.1:1313"                                                                                                                                                   languagecode: en-us
title: a test title
                                                                                                                                                                                   theme: test

MetaDataFormat: yaml
ignoreFiles: [ "\\.foo$" ]

$ ls -l content
total 0

$ hugo_0.20_linux_amd64 -w
WARNING: Site config's rssURI is deprecated and will be removed in a future release. Set baseName in outputFormats.RSS.
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
0 regular pages created
6 other pages created
0 non-page files copied
0 paginator pages created
0 tags created
0 categories created
total in 1 ms
Watching for changes in /home/anb/tmp/hugo/content
Press Ctrl+C to stop

Create some files that shouldn't be pickup by hugo:

$ touch content/bar.foo
$ mkdir content/baz
$ ls public
bar.foo  baz  categories/  index.html  index.xml  sitemap.xml  tags/

xofyarg added a commit to xofyarg/hugo that referenced this issue Apr 20, 2017

Ignore non-source files on partial rebuild.
Partial rebuild does not have the same logic as normal rebuild on
selecting which file to build. This change makes it possible to
share the file select logic between two kinds of build.

Fix gohugoio#3325.

@bep bep closed this in #3326 Apr 22, 2017

bep added a commit that referenced this issue Apr 22, 2017

hugolib: Ignore non-source files on partial rebuild
Partial rebuild does not have the same logic as normal rebuild on
selecting which file to build. This change makes it possible to
share the file select logic between two kinds of build.

Fix #3325.

@ghost ghost referenced this issue May 22, 2017

Open

spf13/hugo v0.21 released #10

bep added a commit that referenced this issue Jun 7, 2017

hugolib: Fix live-reload regression for add/removal of dirs
This reverts commit b5b6e81.

That change breaks watching of new directories (new dirs, deleted dirs).

Reopens #3325
Fixes #3569
@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jun 7, 2017

Member

@xofyarg I had to revert your commit as it broke more than it fixed.

Member

bep commented Jun 7, 2017

@xofyarg I had to revert your commit as it broke more than it fixed.

@bep bep reopened this Jun 7, 2017

bep added a commit that referenced this issue Jun 7, 2017

Revert "hugolib: Fix live-reload regression for add/removal of dirs"
Never mind. The "adding dir" scenario didn't work anyway, so that will need another fix.

This reverts commit 49a1043.

Closes ##3325
@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Jun 7, 2017

Member

Ignore my last comment.

Member

bep commented Jun 7, 2017

Ignore my last comment.

@bep bep closed this Jun 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment