Website: update related topics list on handbook pages (#46408)
Changes: - Updated the list of "Related topics" on handbook pages to only show links to pages in the handbook folder. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved the related pages sidebar to display only handbook-relevant content with stricter filtering criteria. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/fleetdm/fleet/pull/46408?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
+1
-1
@@ -143,7 +143,7 @@ parasails.registerPage('basic-handbook', {
|
||||
let pagesInFolder = (()=>{
|
||||
let relatedPages = [];
|
||||
let thisPagesFolderInTheHandbookFolder = this.thisPage.sectionRelativeRepoPath.split('/')[0];
|
||||
let pagesInThisFolder = _.filter(this.markdownPages, (page)=>{ return _.startsWith(page.sectionRelativeRepoPath, thisPagesFolderInTheHandbookFolder);});
|
||||
let pagesInThisFolder = _.filter(this.markdownPages, (page)=>{ return _.startsWith(page.sectionRelativeRepoPath, thisPagesFolderInTheHandbookFolder) && _.startsWith(page.url, '/handbook');});
|
||||
relatedPages = pagesInThisFolder.map((page)=>{
|
||||
if(!_.startsWith(page.url, '/handbook/company/open-positions') && !_.startsWith(page.url, '/handbook/company/legal') ){
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user