mirror of
https://github.com/spark-store-project/spark-store-abyss
synced 2025-12-16 20:31:38 +08:00
feat: 引入 @nuxt/content
This commit is contained in:
13
content.config.ts
Normal file
13
content.config.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import { defineCollection, defineContentConfig, z } from "@nuxt/content";
|
||||||
|
|
||||||
|
export default defineContentConfig({
|
||||||
|
collections: {
|
||||||
|
download: defineCollection({
|
||||||
|
source: "download/*.md",
|
||||||
|
type: "page",
|
||||||
|
schema: z.object({
|
||||||
|
rawbody: z.string(),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
18
content/download/faq.md
Normal file
18
content/download/faq.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
### 对于 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
|
||||||
|
```
|
||||||
@@ -12,6 +12,7 @@ export default defineNuxtConfig({
|
|||||||
"@nuxt/image",
|
"@nuxt/image",
|
||||||
"@primevue/nuxt-module",
|
"@primevue/nuxt-module",
|
||||||
"@nuxtjs/fontaine",
|
"@nuxtjs/fontaine",
|
||||||
|
"@nuxt/content",
|
||||||
],
|
],
|
||||||
icon: {
|
icon: {
|
||||||
mode: "css",
|
mode: "css",
|
||||||
@@ -144,4 +145,4 @@ document.documentElement.classList.toggle("s-dark", sDarkValue);`,
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify-json/line-md": "^1.2.8",
|
"@iconify-json/line-md": "^1.2.8",
|
||||||
"@iconify-json/proicons": "^1.2.16",
|
"@iconify-json/proicons": "^1.2.16",
|
||||||
|
"@nuxt/content": "3.5.1",
|
||||||
"@nuxt/eslint": "1.4.1",
|
"@nuxt/eslint": "1.4.1",
|
||||||
"@nuxt/icon": "1.13.0",
|
"@nuxt/icon": "1.13.0",
|
||||||
"@nuxt/image": "1.10.0",
|
"@nuxt/image": "1.10.0",
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
"onlyBuiltDependencies": [
|
"onlyBuiltDependencies": [
|
||||||
"@parcel/watcher",
|
"@parcel/watcher",
|
||||||
"@tailwindcss/oxide",
|
"@tailwindcss/oxide",
|
||||||
|
"better-sqlite3",
|
||||||
"esbuild",
|
"esbuild",
|
||||||
"sharp",
|
"sharp",
|
||||||
"unrs-resolver"
|
"unrs-resolver"
|
||||||
|
|||||||
@@ -19,26 +19,6 @@ const dialog = ref(false);
|
|||||||
|
|
||||||
const downloadStarted = 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 = () => {
|
const startDownload = () => {
|
||||||
downloadStarted.value = true;
|
downloadStarted.value = true;
|
||||||
if (selectedArch.value === "loong64") {
|
if (selectedArch.value === "loong64") {
|
||||||
@@ -111,6 +91,14 @@ const consoleDownloadUrl = computed(() => {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const { data: faqContent } = await useAsyncData("/download/faq", () => {
|
||||||
|
return queryCollection("download").path("/download/faq").first();
|
||||||
|
});
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
console.log(faqContent.value);
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -316,7 +304,7 @@ const consoleDownloadUrl = computed(() => {
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<MdPreview
|
<MdPreview
|
||||||
:model-value="faqContent"
|
:model-value="faqContent?.rawbody.replaceAll('\\n', '\n') || ''"
|
||||||
:theme="sDark ? 'dark' : 'light'"
|
:theme="sDark ? 'dark' : 'light'"
|
||||||
preview-theme="github"
|
preview-theme="github"
|
||||||
/>
|
/>
|
||||||
|
|||||||
1646
pnpm-lock.yaml
generated
1646
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user