Skip to content

Change pagefind output to _markbind/logs#2897

Open
yihao03 wants to merge 5 commits intoMarkBind:masterfrom
yihao03:fix/change-pagefind-log-output
Open

Change pagefind output to _markbind/logs#2897
yihao03 wants to merge 5 commits intoMarkBind:masterfrom
yihao03:fix/change-pagefind-log-output

Conversation

@yihao03
Copy link
Copy Markdown
Contributor

@yihao03 yihao03 commented Apr 27, 2026

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:
Change pagefind log output from {projectRoot}/debug.log to {projectRoot}/_markbind/logs/pagefind.log

Anything you'd like to highlight/discuss:

Testing instructions:
Pull the branch and run markbind serve to ensure the log file is created at {projectRoot}/_markbind/logs/pagefind.log and not {projectRoot}/debug.log

Proposed commit message: (wrap lines at 72 characters)
Move pagefind log output to _markbind/logs/pagefind.log


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.32%. Comparing base (79c1860) to head (d20af87).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2897    +/-   ##
========================================
  Coverage   71.32%   71.32%            
========================================
  Files         133      133            
  Lines        7232     7234     +2     
  Branches     1714     1612   -102     
========================================
+ Hits         5158     5160     +2     
- Misses       1973     2068    +95     
+ Partials      101        6    -95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yihao03 yihao03 force-pushed the fix/change-pagefind-log-output branch from 074ca27 to 3e10733 Compare April 27, 2026 02:46
@yihao03
Copy link
Copy Markdown
Contributor Author

yihao03 commented Apr 27, 2026

The pagefind indexer doesn't use our default logger, therefore we have to explicitly pass the logsFolder path to it to ensure correct output location

@yihao03 yihao03 requested a review from Harjun751 April 27, 2026 02:50
@yihao03 yihao03 force-pushed the fix/change-pagefind-log-output branch from 051ec30 to 8785752 Compare April 27, 2026 06:05
@yihao03 yihao03 requested a review from Copilot April 27, 2026 06:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves Pagefind’s log output from the project root (debug.log) into MarkBind’s internal logs directory (_markbind/logs/pagefind.log) to keep generated artifacts organized.

Changes:

  • Update Pagefind createIndex options to write logs to {root}/_markbind/logs/pagefind.log.
  • Update unit tests to expect the new logfile path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
packages/core/src/Site/SiteGenerationManager.ts Changes Pagefind logfile option to _markbind/logs/pagefind.log under the site root.
packages/core/test/unit/Site/SiteGenerationManager.test.ts Adjusts Pagefind createIndex expectations to match the new logfile path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/Site/SiteGenerationManager.ts
Comment thread packages/core/test/unit/Site/SiteGenerationManager.test.ts
Comment thread packages/core/test/unit/Site/SiteGenerationManager.test.ts
Comment thread packages/core/test/unit/Site/SiteGenerationManager.test.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants