Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Force complete reload for stylesheets and images

Abierto
#124 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, python
Área
devtools, web-dev

Línea de trabajo

Start in the mentioned livereload.js code and trace how static stylesheet and image changes are handled, including the liveCSS and liveImg values in WebSocket messages. Check how the Python side creates those messages only as needed. Done means the behavior can be configured so templates without link or style elements receive a complete reload for the affected assets.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

type: feature

I'm using livereload to preview email templates for a project I'm working on. The templates are rendered using Jinja, images are inlined with cid: references (or data: URIs in the case of previewing) and the whole thing is then run through premailer in order to inline all the css onto the elements.

This all works great, I get an instant reload whenever I edit my templates or the json payload going into Jinja. I seem to be having a small issue when it comes to CSS files though, as livereload intelligently identifies them as static assets which can simply be reloaded without refreshing the entire page. In my case this presents a problem though, as there are no link (or even style) element to reload and therefore nothing happens.

I've been looking through the source and was thinking I could change the behaviour by sending liveCSS: False and liveImg: False, but it appears this is not the issue as they're both always true in the WebSocket frames received in the browser. This leads me to believe that the actual logic for how to reload static assets is computed in the livereload.js javascript rather than in python code creating the message after each file modification event.

Could anyone point me in the right direction regarding this matter? I'll be happy to supply a PR adding support for this as configurable option in case I'm able to come up with a satisfactory solution (and given such an option is within the project's scope of course).

Lenguaje dominante
Python
Estrellas
1.1k
Forks
148
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lepture/python-livereload

Todos los issues de lepture/python-livereload

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.