Replace error logging with silent skip when page DNE#2885
Replace error logging with silent skip when page DNE#2885gerteck merged 12 commits intoMarkBind:masterfrom
Conversation
Pages that exist get indexed normally while pages that don't are skipped silently without returning an error message for missing pages.
Included a check for if serving using onepage so that the error is still raised if the file does not exist when the user serves a full build.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2885 +/- ##
==========================================
- Coverage 71.35% 71.32% -0.03%
==========================================
Files 133 133
Lines 7229 7232 +3
Branches 1712 1705 -7
==========================================
Hits 5158 5158
- Misses 1970 1973 +3
Partials 101 101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
no worries @MoshiMoshiMochi , it is but a edge case that is not breaking 😄 Speedy quick fix! if anything, these nits should be caught by the PR reviewer as well 😅 It could also mean our testcases are not comprehensive enough, to which we can improve on! |
|
As discussed, I've update enabling pagefind to its' own option where it is disabled by default. Users will now what to enable it within by declaring the pagefind configuration and setting {
"pagefind": {
"enablePagefind": true
}
}Hence, as it is no longer tied to |
* Add skills commands * Add symlink logic for each agent * Add tests * Improve error handling * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix bugs * Lint copilot suggestion * Fix windows bug * Update docs * Add markbind repo check * Update tests --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Pages that exist get indexed normally while pages that don't are skipped silently without returning an error message for missing pages.
What is the purpose of this pull request?
Overview of changes:
#2882
Replace error logging with silent skip if page does not exist when serving one-page.
Anything you'd like to highlight/discuss:
There should no longer be any pagefind related indexing errors when serving one-page.

This issue arose from #2880, where I began switching the searchable page logic to respect page's option. It was an oversight an oversight by me during development as I had only tested the indexing with a full build. However, using
markbind serve -oonly the landing page is built at startup. ThesitePages.pagesarray contains all pages defined insite.json, but most of their HTML files haven't been generated yet as they are built on-demand when u navigate to them.As prof @damithc mentioned,
Hence, I added a check if a file exist first. If it doesn't & is serving one-page, silently skip to the next file to index. This ensures that the failed to index error doesn't occur because the file did not exist.
This is 100% my bad and on me, my apologies for not realising this earlier. Will be sure to be more thorough when testing out newly added/updated features in the future.
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Add silent skip when indexing a page that does not exist
Checklist: ☑️
Reviewer checklist:
Indicate the SEMVER impact of the PR:
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):