Browse Source

Do not load markdown files starting with a .

index-subcmd
Vincent Prouillet 5 years ago
parent
commit
d11f4aa56a
3 changed files with 2 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +1
    -0
      components/site/src/lib.rs
  3. +0
    -0
      test_site/content/.should-not-be-picked-up.md

+ 1
- 0
CHANGELOG.md View File

@@ -12,6 +12,7 @@
- Fix `--base-url` not overriding processed images URLs
- Many many times faster (x10-x20) for sites with thousands of pages
- 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)



+ 1
- 0
components/site/src/lib.rs View File

@@ -179,6 +179,7 @@ impl Site {
let (section_entries, page_entries): (Vec<_>, Vec<_>) = glob(&content_glob)
.unwrap()
.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");

let sections = {


+ 0
- 0
test_site/content/.should-not-be-picked-up.md View File


Loading…
Cancel
Save