@@ -142,27 +142,22 @@ public function watch($reload = false, $moveStatic = true, $noCacheBuster = fals
142
142
}
143
143
144
144
// iterate over the data files and regenerate the entire site if they've changed
145
- $ objects = new \RecursiveIteratorIterator (new \RecursiveDirectoryIterator (Config::$ options ["sourceDir " ]."/_data / " ), \RecursiveIteratorIterator::SELF_FIRST );
145
+ $ objects = new \RecursiveIteratorIterator (new \RecursiveDirectoryIterator (Config::$ options ["sourceDir " ]."/_annotations / " ), \RecursiveIteratorIterator::SELF_FIRST );
146
146
147
147
// make sure dots are skipped
148
148
$ objects ->setFlags (\FilesystemIterator::SKIP_DOTS );
149
149
150
150
foreach ($ objects as $ name => $ object ) {
151
151
152
- $ fileName = str_replace (Config::$ options ["sourceDir " ]."/_data " .DIRECTORY_SEPARATOR ,"" ,$ name );
152
+ $ fileName = str_replace (Config::$ options ["sourceDir " ]."/_annotations " .DIRECTORY_SEPARATOR ,"" ,$ name );
153
153
$ mt = $ object ->getMTime ();
154
154
155
155
if (!isset ($ o ->$ fileName )) {
156
156
$ o ->$ fileName = $ mt ;
157
- if (($ fileName [0 ] != "_ " ) && $ object ->isFile ()) {
158
- FileUtil::moveStaticFile ("_data/ " .$ fileName ,"" ,"_data " ,"data " );
159
- }
157
+ $ this ->updateSite ($ fileName ,"added " );
160
158
} else if ($ o ->$ fileName != $ mt ) {
161
159
$ o ->$ fileName = $ mt ;
162
160
$ this ->updateSite ($ fileName ,"changed " );
163
- if (($ fileName [0 ] != "_ " ) && $ object ->isFile ()) {
164
- FileUtil::moveStaticFile ("_data/ " .$ fileName ,"" ,"_data " ,"data " );
165
- }
166
161
}
167
162
168
163
}
0 commit comments