Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Why is index.html ignored when I do not issue any ignore pattern and how to fix this?

Đang mở
#235 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

Start by tracing Server.watch and server.serve through the watcher handling shown in the issue, using the printed _tasks entries for build/**/* and build/*. Determine why build/index.html is logged as ignored despite ignore being None. Done means identifying the cause and documenting or verifying a configuration that watches all files under build.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I run a livereload server from this code:

from livereload import Server, shell
server = Server()
server.watch('build/**/*')
server.watch('build/*')
print(server.watcher._tasks)
server.serve(host='0.0.0.0', root='build', port=9000)

When I run this server and then change the stuff in my site directory build I get logging output like this:

$$$ python server.py                                                                                 
{'build/**/*': {'func': None, 'delay': None, 'ignore': None, 'mtimes': {}}, 
 'build/*': {'func': None, 'delay': None, 'ignore': None, 'mtimes': {}}}
[I 201025 13:23:17 server:335] Serving on http://0.0.0.0:9000
[I 201025 13:23:17 handlers:62] Start watching changes
[I 201025 13:23:17 handlers:64] Start detecting changes
[I 201025 13:23:38 handlers:135] Browser Connected: http://localhost:9000/gallery/
[I 201025 13:24:36 handlers:95] Reload 1 waiters: build/static/css/custom.css
[I 201025 13:24:37 handlers:82] Ignore: build/index.html

The output shows in the last line that build/index.html is ignored hwich totally defets the propsuse - beacsue build/index.html was chanegd. And my debug print line at the top show clearly that in _tasks is no ignore attrivute set.

So why is build/index.html ignored and how can I tell livereload to watch all files in the directory build for changes. (The site is not very big; it contains only 114 files).

Ngôn ngữ chính
Python
Star
1.1k
Fork
148
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lepture/python-livereload

Tất cả issue của lepture/python-livereload

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.