feat: 引入 @nuxt/content

This commit is contained in:
2025-06-06 01:33:40 +08:00
parent e558f44ac0
commit dade6466bb
6 changed files with 1643 additions and 69 deletions

View File

@@ -19,26 +19,6 @@ const dialog = ref(false);
const downloadStarted = ref(false);
const faqContent = ref(
`### 对于 Ubuntu 20.04 用户
1. **下载依赖包**
- 请访问[星火应用商店依赖包下载页面](https://gitee.com/spark-store-project/spark-store-dependencies/releases/tag/1.0),下载最新的依赖包。
- 请多次解压依赖包,直到你可以看到诸多以 deb 结尾的安装包。
- 请根据依赖包内的说明,一次性安装所有的依赖包。
2. **下载并安装**
如果你已经正确选择了正确的计算机架构amd64、arm64 或 loong64点击下一步将自动下载最新版本的星火应用商店安装包。
假设您下载到用户目录下的 Downloads 文件夹,我们推荐您使用 APT 工具安装:
\`\`\`bash
cd ~/Downloads
sudo apt install ./spark-store-*.deb
\`\`\`
`
);
const startDownload = () => {
downloadStarted.value = true;
if (selectedArch.value === "loong64") {
@@ -111,6 +91,14 @@ const consoleDownloadUrl = computed(() => {
}
return "";
});
const { data: faqContent } = await useAsyncData("/download/faq", () => {
return queryCollection("download").path("/download/faq").first();
});
onMounted(() => {
console.log(faqContent.value);
});
</script>
<template>
@@ -316,7 +304,7 @@ const consoleDownloadUrl = computed(() => {
}"
>
<MdPreview
:model-value="faqContent"
:model-value="faqContent?.rawbody.replaceAll('\\n', '\n') || ''"
:theme="sDark ? 'dark' : 'light'"
preview-theme="github"
/>