merge: regular update #3

Merged
V-Conet merged 7 commits from Mirrors/hexo-theme-stellar:main into main 2026-02-19 19:28:05 +08:00
Owner
No description provided.
* feat: support pjax to implement non-refresh loading

* amend: pjax implementation

* opt: pjax transition

* fix: page crashes when author, avatar and email is empty

* fix: always show cover page on wiki mode

* opt: reuse dom to improve performance

* fix: active-icon not update after page switched

* fix: do not clear no longer existing dom on replace
* fix: dynamic data won't load on pjax page changes

* fix: update plugins to conforms to pjax

* opt: loading indicator for compact components

* fix: set scroll position to top on page loaded

* opt: update pjax config

* fix: potential duplicated search binding

* fix: complete services.ejs PJAX resource cleanup

- Add _searchInitialized flag after searchFunc call to prevent duplicates
- Fix timer race condition by using scoped variables
- Store and cleanup all event listeners (click handlers)
- Improve IntersectionObserver cleanup
- Add comprehensive cleanup function for all resources

* fix: complete utils.js PJAX listener cleanup

- Add _pjaxListeners Set to track all PJAX event listeners
- Implement cleanupPjaxListeners() to remove all listeners
- Add cleanupAll() for comprehensive resource cleanup
- Fix memory leak in utils.jq() by tracking listeners

* perf: optimize PJAX widget comparison and scroll handling

- Use lightweight comparison strategy (avoid expensive innerHTML)
- Add widget ID checking for better performance
- Fix sidebar scroll position restoration after DOM updates
- Simplify scroll logic to avoid double scrolling
- Use isEqualNode instead of innerHTML comparison

* opt: update plugin initialization for PJAX compatibility

- Update copycode, mermaid, scrollreveal, swiper plugins
- Improve loading indicator styles
- Ensure plugins work correctly with PJAX navigation
* Initial plan

* Fix: Reinitialize comments after PJAX navigation

- Refactored all comment system scripts (Giscus, Waline, Twikoo, Artalk, Utterances, Beaudar) to expose initialization functions globally
- Added comment reinitialization logic to stellar.initPage() to handle PJAX transitions
- Comments now properly reload when navigating between pages with PJAX enabled

Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>
* Initial plan

* Add executeCommentScripts to re-register comment init functions on PJAX navigation

Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>

* Handle module scripts with blob URLs in executeCommentScripts

Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>

* Address code review feedback: add error handler and fix cleanup timing

Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: xaoxuu <16400144+xaoxuu@users.noreply.github.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
V-Conet/hexo-theme-stellar!3
No description provided.