mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
Website: Update handbook page script to not create a link to handbook/company/handbook page in handbook index. (#14755)
FYI @Sampfluger88 Changes: - Updated the handbook page script to: - Add comments explaining what links are added to the handbook index. - Exclude the handbook/company/handbook page from the handbook index.
This commit is contained in:
parent
06aec6401f
commit
a5fff556c1
1 changed files with 5 additions and 1 deletions
|
|
@ -64,7 +64,11 @@ parasails.registerPage('basic-handbook', {
|
|||
if(this.isHandbookLandingPage) {
|
||||
let handbookPages = [];
|
||||
for (let page of this.markdownPages) {
|
||||
if(_.startsWith(page.url, '/handbook/company') && !page.title.match(/^readme\.md$/i) && !_.startsWith(page.url, '/handbook/company/open-positions')) {
|
||||
if(
|
||||
_.startsWith(page.url, '/handbook/company')// Only add links for pages in the handbook/company/ folder
|
||||
&& page.url !== '/handbook/company/handbook'// Hide the /handbook/company/handbook page in the handbook index.
|
||||
&& !_.startsWith(page.url, '/handbook/company/open-positions')// Don't create links to pages generated for open positions.
|
||||
) {
|
||||
let pageTitle = page.title;
|
||||
if(this.hideEmojisOnPage){
|
||||
pageTitle = pageTitle.replace(this.regexToMatchEmoji, '');
|
||||
|
|
|
|||
Loading…
Reference in a new issue