mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 20:29:53 +00:00
website: downloads page (#3088)
* website: downloads page * link * website: fix h2 headers issue * website: fix sidebar issue * website: fix language changer for downloads page in navbar * update, add security assessment section --------- Co-authored-by: M Sarmad Qadeer <MSarmadQadeer@gmail.com>
This commit is contained in:
parent
b08768ea71
commit
3419ce293b
27 changed files with 141 additions and 50 deletions
|
@ -56,39 +56,34 @@ Object.entries(fileLanguageMapping).forEach(([fileName, languages]) => {
|
|||
const permalink = `/docs/${linkPath}`.toLowerCase();
|
||||
|
||||
if (fileName === 'JOIN_TEAM') {
|
||||
parsedMatter.data.title = 'SimpleX Chat - Jobs';
|
||||
parsedMatter.data.permalink = '/jobs/index.html';
|
||||
parsedMatter.data.layout = 'layouts/jobs.html';
|
||||
parsedMatter.data.active_jobs = true;
|
||||
}
|
||||
else {
|
||||
parsedMatter.data.permalink = permalink;
|
||||
if (!parsedMatter.data.permalink) parsedMatter.data.permalink = permalink;
|
||||
|
||||
// Update the frontmatter with the new languages list
|
||||
parsedMatter.data.supportedLangsForDoc = languages;
|
||||
// Update the frontmatter with the new languages list
|
||||
parsedMatter.data.supportedLangsForDoc = languages;
|
||||
|
||||
// Add the layout value
|
||||
parsedMatter.data.layout = 'layouts/doc.html';
|
||||
// Add the layout value
|
||||
if (!parsedMatter.data.layout) parsedMatter.data.layout = 'layouts/doc.html';
|
||||
|
||||
if (fullPath.startsWith(path.join(directoryPath, langFolder))) {
|
||||
// Non-English files
|
||||
const [language, ...rest] = relativePath.split(path.sep).slice(1);
|
||||
const enFilePath = path.join(directoryPath, ...rest);
|
||||
if (fullPath.startsWith(path.join(directoryPath, langFolder))) {
|
||||
// Non-English files
|
||||
const [language, ...rest] = relativePath.split(path.sep).slice(1);
|
||||
const enFilePath = path.join(directoryPath, ...rest);
|
||||
|
||||
if (enFiles[enFilePath]) {
|
||||
const enRevision = new Date(enFiles[enFilePath].revision);
|
||||
const currentRevision = new Date(parsedMatter.data.revision);
|
||||
if (enFiles[enFilePath]) {
|
||||
const enRevision = new Date(enFiles[enFilePath].revision);
|
||||
const currentRevision = new Date(parsedMatter.data.revision);
|
||||
|
||||
const isOld = currentRevision < enRevision;
|
||||
// Add the version value
|
||||
parsedMatter.data.version = isOld ? 'old' : 'new';
|
||||
}
|
||||
} else {
|
||||
// English files
|
||||
enFiles[fullPath] = { revision: parsedMatter.data.revision };
|
||||
const isOld = currentRevision < enRevision;
|
||||
// Add the version value
|
||||
parsedMatter.data.version = 'new';
|
||||
parsedMatter.data.version = isOld ? 'old' : 'new';
|
||||
}
|
||||
} else {
|
||||
// English files
|
||||
enFiles[fullPath] = { revision: parsedMatter.data.revision };
|
||||
// Add the version value
|
||||
parsedMatter.data.version = 'new';
|
||||
}
|
||||
|
||||
// Save the updated frontmatter and content back to the file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue