Github Pages - Jekyll Chirpy 테마에서 수동 업데이트 없이 변경사항 라이브에 적용하기
Github pages에 글을 추가해도 브라우저에서 Force Refresh 없이는 변경사항이 적용되지 않는것 처럼 보여지는 문제를 해결하는 방법에 대해 정리한다.
PWA를 통해 브라우저에 저장된 캐시를 로드하는 기능이 있어서 생기는 문제인듯 하다.
Solution
@/_config.yml::pwa::deny_paths에 _posts경로를 추가하자
1
2
3
4
5
6
7
8
9
10
11
12
...
pwa:
enabled: true # the option for PWA feature (installable)
cache:
enabled: true # the option for PWA offline cache
# Paths defined here will be excluded from the PWA cache.
# Usually its value is the `baseurl` of another website that
# shares the same domain name as the current website.
deny_paths:
# - "/example" # URLs match `<SITE_URL>/example/*` will not be cached by the PWA
"/_posts"
...
This post is licensed under CC BY 4.0 by the author.