mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-23 04:34:15 -04:00
(search) index some pages independently from links module
This commit is contained in:
parent
15b9f0225a
commit
b1fd9adadc
@ -256,117 +256,6 @@ const kinds: SearchKind[] = [
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.terminology.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.terminology.route)}`,
|
||||
title: translator.translate('terminology.headerLong'),
|
||||
content: translator.get<string[]>('terminology.info')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.calendar?.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.calendar.route)}`,
|
||||
title: translator.translate('calendar.headerLong'),
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.census.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.census.route)}`,
|
||||
title: translator.translate('census.headerLong'),
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.inclusive.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.inclusive.route)}`,
|
||||
title: translator.translate('inclusive.headerLong'),
|
||||
content: translator.get<string[]>('inclusive.info')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.names.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.names.route)}`,
|
||||
title: translator.translate('names.headerLong'),
|
||||
content: [
|
||||
translator.translate('inclusive.description'),
|
||||
...translator.get<string[]>('inclusive.info')
|
||||
.map((text) => clearLinkedText(text, false)),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.people.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.people.route)}`,
|
||||
title: translator.translate('people.headerLonger'),
|
||||
content: [
|
||||
translator.translate('people.description'),
|
||||
...translator.get<string[]>('people.info')
|
||||
.map((text) => clearLinkedText(text, false)),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.contact.enabled && config.contact.team.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.contact.team.route)}`,
|
||||
title: translator.translate('contact.team.name'),
|
||||
content: [
|
||||
translator.translate('contact.team.description'),
|
||||
translator.translate('contact.contribute.header'),
|
||||
translator.translate('home.mission.header'),
|
||||
translator.translate('home.mission.summary'),
|
||||
translator.translate('home.mission.freedom'),
|
||||
translator.translate('home.mission.respect'),
|
||||
translator.translate('home.mission.inclusivity'),
|
||||
`${translator.translate('contact.contribute.intro')}:`,
|
||||
...['entries', 'translations', 'version', 'technical'].map((area) => {
|
||||
const header = translator.translate(`contact.contribute.${area}.header`);
|
||||
const description = translator.translate(`contact.contribute.${area}.description`);
|
||||
return `${header}: ${clearLinkedText(description, false)}`;
|
||||
}),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.workshops?.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.workshops.route)}`,
|
||||
title: translator.translate('workshops.headerLong'),
|
||||
content: translator.get<string[]>('workshops.content')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.contact.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.contact.route)}`,
|
||||
title: translator.translate('contact.header'),
|
||||
content: [
|
||||
translator.translate('contact.faq'),
|
||||
translator.translate('contact.technical'),
|
||||
translator.translate('contact.hate'),
|
||||
translator.translate('contact.language'),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
addDocument({
|
||||
url: 'https://shop.pronouns.page',
|
||||
title: translator.translate('contact.groups.shop'),
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.english.enabled) {
|
||||
@ -382,6 +271,117 @@ const kinds: SearchKind[] = [
|
||||
});
|
||||
}
|
||||
|
||||
if (config.terminology.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.terminology.route)}`,
|
||||
title: translator.translate('terminology.headerLong'),
|
||||
content: translator.get<string[]>('terminology.info')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.calendar?.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.calendar.route)}`,
|
||||
title: translator.translate('calendar.headerLong'),
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.census.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.census.route)}`,
|
||||
title: translator.translate('census.headerLong'),
|
||||
content: '',
|
||||
});
|
||||
}
|
||||
|
||||
if (config.inclusive.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.inclusive.route)}`,
|
||||
title: translator.translate('inclusive.headerLong'),
|
||||
content: translator.get<string[]>('inclusive.info')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.names.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.names.route)}`,
|
||||
title: translator.translate('names.headerLong'),
|
||||
content: [
|
||||
translator.translate('inclusive.description'),
|
||||
...translator.get<string[]>('inclusive.info')
|
||||
.map((text) => clearLinkedText(text, false)),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.people.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.people.route)}`,
|
||||
title: translator.translate('people.headerLonger'),
|
||||
content: [
|
||||
translator.translate('people.description'),
|
||||
...translator.get<string[]>('people.info')
|
||||
.map((text) => clearLinkedText(text, false)),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.contact.enabled && config.contact.team.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.contact.team.route)}`,
|
||||
title: translator.translate('contact.team.name'),
|
||||
content: [
|
||||
translator.translate('contact.team.description'),
|
||||
translator.translate('contact.contribute.header'),
|
||||
translator.translate('home.mission.header'),
|
||||
translator.translate('home.mission.summary'),
|
||||
translator.translate('home.mission.freedom'),
|
||||
translator.translate('home.mission.respect'),
|
||||
translator.translate('home.mission.inclusivity'),
|
||||
`${translator.translate('contact.contribute.intro')}:`,
|
||||
...['entries', 'translations', 'version', 'technical'].map((area) => {
|
||||
const header = translator.translate(`contact.contribute.${area}.header`);
|
||||
const description = translator.translate(`contact.contribute.${area}.description`);
|
||||
return `${header}: ${clearLinkedText(description, false)}`;
|
||||
}),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.workshops?.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.workshops.route)}`,
|
||||
title: translator.translate('workshops.headerLong'),
|
||||
content: translator.get<string[]>('workshops.content')
|
||||
.map((text) => clearLinkedText(text, false))
|
||||
.join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
if (config.contact.enabled) {
|
||||
addDocument({
|
||||
url: `/${encodeURIComponent(config.contact.route)}`,
|
||||
title: translator.translate('contact.header'),
|
||||
content: [
|
||||
translator.translate('contact.faq'),
|
||||
translator.translate('contact.technical'),
|
||||
translator.translate('contact.hate'),
|
||||
translator.translate('contact.language'),
|
||||
].join(' '),
|
||||
});
|
||||
}
|
||||
|
||||
addDocument({
|
||||
url: 'https://shop.pronouns.page',
|
||||
title: translator.translate('contact.groups.shop'),
|
||||
content: '',
|
||||
});
|
||||
|
||||
return documents;
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user