feat(docs): Add integration for downloading and incorporating readme documents from external domains
This commit is contained in:
@ -29,6 +29,12 @@ export default async () => {
|
||||
plugins.path.join(paths.docsDir, 'push.rocks'),
|
||||
);
|
||||
|
||||
await helpers.downloadReadmes(
|
||||
'https://code.foss.global',
|
||||
'serve.zone',
|
||||
plugins.path.join(paths.docsDir, 'serve.zone'),
|
||||
);
|
||||
|
||||
|
||||
return plugins.vitepress.defineConfig({
|
||||
lang: 'en-US',
|
||||
|
@ -139,6 +139,7 @@ export async function downloadReadmes(
|
||||
let readmeContent = atob(readmeContentResponseObject.content);
|
||||
readmeContent = `---
|
||||
title: "@${org}/${repo.name}"
|
||||
source: "gitea"
|
||||
---
|
||||
${readmeContent}`;
|
||||
const sanitizedRepoName = repoName.replace(/[^a-z0-9_\-]/gi, '_'); // Sanitize filename
|
||||
|
Reference in New Issue
Block a user