Do not load markdown files starting with a .

This commit is contained in:
Vincent Prouillet 2018-09-13 17:07:14 +02:00
parent 58e2793097
commit d11f4aa56a
3 changed files with 2 additions and 0 deletions

View file

@ -12,6 +12,7 @@
- Fix `--base-url` not overriding processed images URLs - Fix `--base-url` not overriding processed images URLs
- Many many times faster (x10-x20) for sites with thousands of pages - Many many times faster (x10-x20) for sites with thousands of pages
- Add more Emacs temp file to the ignored patterns in `gutenberg serve` - Add more Emacs temp file to the ignored patterns in `gutenberg serve`
- Files starting with `.` are not considered pages anymore even if they end with `.md`
## 0.4.2 (2018-09-03) ## 0.4.2 (2018-09-03)

View file

@ -179,6 +179,7 @@ impl Site {
let (section_entries, page_entries): (Vec<_>, Vec<_>) = glob(&content_glob) let (section_entries, page_entries): (Vec<_>, Vec<_>) = glob(&content_glob)
.unwrap() .unwrap()
.filter_map(|e| e.ok()) .filter_map(|e| e.ok())
.filter(|e| !e.as_path().file_name().unwrap().to_str().unwrap().starts_with("."))
.partition(|entry| entry.as_path().file_name().unwrap() == "_index.md"); .partition(|entry| entry.as_path().file_name().unwrap() == "_index.md");
let sections = { let sections = {