Merge branch 'main' into search

This commit is contained in:
taskylizard 2025-06-21 04:43:35 +00:00
commit 47ee7f23d0
No known key found for this signature in database
GPG key ID: 1820131ED1A24120
44 changed files with 2659 additions and 2681 deletions

View file

@ -53,7 +53,7 @@ export default defineConfig({
'meta',
{
name: 'msvalidate.01',
content: '55ae5a0600A8C7827B59CFD506D76DC2'
content: 'F3028112EF6F929B562F4B18E58E3691'
}
],
// Google site verification
@ -158,7 +158,7 @@ export default defineConfig({
search,
footer: {
message: `${feedback} (rev: ${commitRef})`,
copyright: `© ${new Date().getFullYear()}, <a href="https://i.ibb.co/pLVXBSh/image.png">Estd 2018.</a>`
copyright: `© ${new Date().getFullYear()}, <a href="https://i.ibb.co/pLVXBSh/image.png">Estd 2018.</a><div></div>This site does not host any files.`
},
editLink: {
pattern: 'https://github.com/fmhy/edit/edit/main/docs/:path',

View file

@ -224,7 +224,7 @@ export function transform(text: string): string {
_text = replaceUnderscore(_text)
.replace(/\/#(\d)/g, '/#_$1') // Prefix headings starting with numbers
.replace(/#(\d)/g, '#_$1') // Prefix headings starting with numbers
.replace(/\/#/g, '#')
.replace(/(\]\(\s*)\/\s*(\#[^)\s]*?\s*\))/g, '$1$2')
.replace(/\*\*\*\n\n/gm, '')
.replace(/\*\*\*\n/gm, '')
.replace(/# ►/g, '##')
@ -284,6 +284,12 @@ const transformLinks = (text: string): string =>
replace:
'<a target="_blank" href="$1"><div alt="GitLab" class="i-carbon:logo-gitlab" /></a>'
},
{
name: 'Source Code',
find: /\[Source Code\]\(([^\)]*?)\)/gm,
replace:
'<a target="_blank" href="$1"><div alt="Source Code" class="i-gravity-ui:code" /></a>'
},
{
name: 'Telegram',
find: /\[Telegram\]\(([^\)]*?)\)/gm,
@ -307,6 +313,43 @@ const transformLinks = (text: string): string =>
find: /\[.onion\]\(([^\)]*?)\)/gm,
replace:
'<a target="_blank" href="$1"><div alt=".onion" class="i-simple-icons:torbrowser w-1em h-1em" /></a>'
},
// Platform indicators
{
name: 'Windows',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)Windows(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="Windows" class="i-qlementine-icons:windows-24" /> '
},
{
name: 'Mac',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)Mac(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="Mac" class="i-qlementine-icons:mac-fill-16" /> '
},
{
name: 'Linux',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)Linux(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="Linux" class="i-fluent-mdl2:linux-logo-32" /> '
},
{
name: 'Android',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)Android(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="Android" class="i-material-symbols:android" /> '
},
{
name: 'iOS',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)iOS(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="iOS" class="i-simple-icons:ios" /> '
},
{
name: 'Web',
find: /(?<=\/ (\/>|[^/\r\n])*)(,\s)?(?<![a-z]\s)Web(?=,|[ \t]\/|$)/gm,
replace:
' <div alt="Web" class="i-fluent:globe-32-filled" /> '
}
])
.getText()