diff --git a/.gitattributes b/.gitattributes index 06eb02d0bf..0f4eae9ad3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,4 +3,5 @@ app/stage/** linguist-vendored app/src/asset/pdf/** linguist-vendored *.yml linguist-language=shell *.bat linguist-language=shell -*.json linguist-language=shell \ No newline at end of file +*.json linguist-language=shell +*.mdx linguist-language=astro \ No newline at end of file diff --git a/.github/README.md b/.github/README.md index e8e08b33db..593ed2f3fb 100644 --- a/.github/README.md +++ b/.github/README.md @@ -15,35 +15,48 @@ 思源(SiYuan) | 汐洛(Sillot)

+## 📚 文档 + +

+

正常访问 https://sillot.db.sc.cn/

+

代理访问 https://sillot-docs.db.sc.cn/

+

+

-




+

split +


-## 浏览器兼容性 +## 🔭 Roadmap - +

+

汐洛路线图(Sillot Roadmap)

+

汐洛安卓路线图(Sillot Android Roadmap)

+

汐洛社区路线图(Sillot Community Roadmap)

+

-




+

split +


-## 🛠️ Contributors +## 🌐 兼容性 - - - + + + +

-




+

split +


-## 🔭 Roadmap +## 🛠️ 贡献者 -

-

汐洛路线图(Sillot Roadmap)

-

汐洛安卓路线图(Sillot Android Roadmap)

-

汐洛社区路线图(Sillot Community Roadmap)

-

+ + + diff --git a/docs/starlight/astro.config.mjs b/docs/starlight/astro.config.mjs index b1c598fda9..28be0c584a 100644 --- a/docs/starlight/astro.config.mjs +++ b/docs/starlight/astro.config.mjs @@ -1,24 +1,59 @@ import { defineConfig } from 'astro/config'; import starlight from '@astrojs/starlight'; +import starlightLinksValidator from 'starlight-links-validator' // https://astro.build/config export default defineConfig({ + site: 'https://sillot.db.sc.cn', + prefetch: true, // REF https://docs.astro.build/zh-cn/guides/prefetch/ + plugins: [ + starlightLinksValidator({ + errorOnFallbackPages: false, // 未翻译的页面不会报错 + errorOnRelativeLinks: false, + }), + ], integrations: [ + // [src/content/docs/] 将由 starlight 负责样式,[src/pages/] 则不受影响,在自定义页面中使用 Starlight 布局,请使用 组件包装页面内容。 + // REF https://starlight.astro.build/zh-cn/guides/pages/ starlight({ - title: '🦢 Sillot Docs', + title: 'Sillot Docs 🦢', + logo: { + src: './src/assets/icon.svg', + }, social: { github: 'https://github.com/Hi-Windom/Sillot', }, - sidebar: [ + editLink: { + baseUrl: 'https://github.com/Hi-Windom/Sillot/edit/master/docs/starlight', + }, + lastUpdated: true, + defaultLocale: 'root', // 可选 + locales: { + root: { + label: '简体中文', + lang: 'zh-CN', // lang 是 root 语言必须的 + }, + // 英文文档在 `src/content/docs/en/` 中。 + en: { + label: 'English', + lang: 'en', + }, + ja: { label: '日本語', lang: 'ja' }, + de: { label: 'Deutsch', lang: 'de' }, + es: { label: 'Español', lang: 'es' }, + fr: { label: 'Français', lang: 'fr' }, + it: { label: 'Italiano', lang: 'it' }, + ko: { label: '한국어', lang: 'ko' }, + ru: { label: 'Русский', lang: 'ru' }, + }, + sidebar: [ // REF https://starlight.astro.build/zh-cn/guides/sidebar/ { label: 'Guides', - items: [ - // Each item here is one entry in the navigation menu. - { label: 'Example Guide', link: '/guides/example/' }, - ], + autogenerate: { directory: '/guides' }, }, { label: 'Reference', + collapsed: true, // 默认折叠分组 autogenerate: { directory: 'reference' }, }, { @@ -28,4 +63,7 @@ export default defineConfig({ ], }), ], + components: { + FeedbackComponent: "./src/components/FeedbackComponent.astro" + } }); diff --git a/docs/starlight/package.json b/docs/starlight/package.json index 765379453c..57f976ddd1 100644 --- a/docs/starlight/package.json +++ b/docs/starlight/package.json @@ -14,7 +14,12 @@ "@astrojs/starlight": "^0.21.2", "@vercel/speed-insights": "^1.0.10", "astro": "^4.3.5", + "astro-feelback": "^0.3.4", "sharp": "^0.32.5", + "starlight-links-validator": "^0.6.0", "typescript": "^5.4.3" + }, + "devDependencies": { + "sass": "^1.72.0" } } \ No newline at end of file diff --git a/docs/starlight/pnpm-lock.yaml b/docs/starlight/pnpm-lock.yaml index fb92d51b6a..707ae5e6ea 100644 --- a/docs/starlight/pnpm-lock.yaml +++ b/docs/starlight/pnpm-lock.yaml @@ -13,19 +13,29 @@ importers: version: 0.5.10(typescript@5.4.3) '@astrojs/starlight': specifier: ^0.21.2 - version: 0.21.2(astro@4.5.9(typescript@5.4.3)) + version: 0.21.2(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)) '@vercel/speed-insights': specifier: ^1.0.10 version: 1.0.10 astro: specifier: ^4.3.5 - version: 4.5.9(typescript@5.4.3) + version: 4.5.9(sass@1.72.0)(typescript@5.4.3) + astro-feelback: + specifier: ^0.3.4 + version: 0.3.4 sharp: specifier: ^0.32.5 version: 0.32.6 + starlight-links-validator: + specifier: ^0.6.0 + version: 0.6.0(@astrojs/starlight@0.21.2(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)))(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)) typescript: specifier: ^5.4.3 version: 5.4.3 + devDependencies: + sass: + specifier: ^1.72.0 + version: 1.72.0 packages: @@ -490,6 +500,9 @@ packages: '@expressive-code/plugin-text-markers@0.33.5': resolution: {integrity: sha512-JxSHL1MGrJAPNaUMjFXex3K+9NJDbfew9H6PmX8LQ+fm9VNQdtBYTAz/x7nqOk7bkTrtAZK5RfDqUfb8U5M+2A==} + '@feelback/js@0.3.4': + resolution: {integrity: sha512-xr7gTqSJcVUYQlELs1TntYovCBjMcYUr/hGKTnDoF64/lig5CbX4bOmqLoF50IImCy5q3oIwg9w+TSFvtBwsIA==} + '@jridgewell/gen-mapping@0.3.5': resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} @@ -795,6 +808,9 @@ packages: peerDependencies: astro: ^4.0.0-beta || ^3.3.0 + astro-feelback@0.3.4: + resolution: {integrity: sha512-ra69QTsdyjzQKdYeu+qngNcPOgspaWOFJLDFdpA/JryGo55uruw76455UVt2rf3NsZulBnYHS6+upPIO5O7t7A==} + astro@4.5.9: resolution: {integrity: sha512-GheU72Goz7dYQNKaqTxB2H49cNvHfahGSbNkTvMXk+gyHf/g633qadqlO2ZQbTUacoUWmDzvS5fhMZt2/w4naQ==} engines: {node: '>=18.14.1', npm: '>=6.14.0'} @@ -1295,6 +1311,9 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + immutable@4.3.5: + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + import-meta-resolve@4.0.0: resolution: {integrity: sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==} @@ -1310,6 +1329,10 @@ packages: inline-style-parser@0.2.2: resolution: {integrity: sha512-EcKzdTHVe8wFVOGEYXiW9WmJXPjqi1T+234YpJr98RiFYKHV3cdy1+3mkTE+KHTHxFFLH51SfaGOoUdW+v7ViQ==} + is-absolute-url@4.0.1: + resolution: {integrity: sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-alphabetical@2.0.1: resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} @@ -1938,6 +1961,11 @@ packages: safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + sass@1.72.0: + resolution: {integrity: sha512-Gpczt3WA56Ly0Mn8Sl21Vj94s1axi9hDIzDFn9Ph9x3C3p4nNyvsqJoQyVXKou6cBlfFWEgRW4rT8Tb4i3XnVA==} + engines: {node: '>=14.0.0'} + hasBin: true + sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} @@ -2007,6 +2035,13 @@ packages: sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + starlight-links-validator@0.6.0: + resolution: {integrity: sha512-YXzKKZHM79ccBTO61l2WSmgdCG3406gldpVM6J2LhqZ5CeXsOgj6lho2xMLkc/p5nWcNSuYI2qNzsNUrLTmR5w==} + engines: {node: '>=18.14.1'} + peerDependencies: + '@astrojs/starlight': '>=0.15.0' + astro: '>=4.0.0' + stdin-discarder@0.1.0: resolution: {integrity: sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2477,12 +2512,12 @@ snapshots: - supports-color dev: false - '@astrojs/mdx@2.2.1(astro@4.5.9(typescript@5.4.3))': + '@astrojs/mdx@2.2.1(astro@4.5.9(sass@1.72.0)(typescript@5.4.3))': dependencies: '@astrojs/markdown-remark': 4.3.1 '@mdx-js/mdx': 3.0.1 acorn: 8.11.3 - astro: 4.5.9(typescript@5.4.3) + astro: 4.5.9(sass@1.72.0)(typescript@5.4.3) es-module-lexer: 1.4.2 estree-util-visit: 2.0.0 github-slugger: 2.0.0 @@ -2510,15 +2545,15 @@ snapshots: zod: 3.22.4 dev: false - '@astrojs/starlight@0.21.2(astro@4.5.9(typescript@5.4.3))': + '@astrojs/starlight@0.21.2(astro@4.5.9(sass@1.72.0)(typescript@5.4.3))': dependencies: - '@astrojs/mdx': 2.2.1(astro@4.5.9(typescript@5.4.3)) + '@astrojs/mdx': 2.2.1(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)) '@astrojs/sitemap': 3.1.1 '@pagefind/default-ui': 1.0.4 '@types/hast': 3.0.4 '@types/mdast': 4.0.3 - astro: 4.5.9(typescript@5.4.3) - astro-expressive-code: 0.33.5(astro@4.5.9(typescript@5.4.3)) + astro: 4.5.9(sass@1.72.0)(typescript@5.4.3) + astro-expressive-code: 0.33.5(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)) bcp-47: 2.1.0 hast-util-from-html: 2.0.1 hast-util-select: 6.0.2 @@ -2949,6 +2984,9 @@ snapshots: unist-util-visit-parents: 5.1.3 dev: false + '@feelback/js@0.3.4': + dev: false + '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 @@ -3291,7 +3329,6 @@ snapshots: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 - dev: false arg@5.0.2: dev: false @@ -3315,14 +3352,19 @@ snapshots: astring@1.8.6: dev: false - astro-expressive-code@0.33.5(astro@4.5.9(typescript@5.4.3)): + astro-expressive-code@0.33.5(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)): dependencies: - astro: 4.5.9(typescript@5.4.3) + astro: 4.5.9(sass@1.72.0)(typescript@5.4.3) hast-util-to-html: 8.0.4 remark-expressive-code: 0.33.5 dev: false - astro@4.5.9(typescript@5.4.3): + astro-feelback@0.3.4: + dependencies: + '@feelback/js': 0.3.4 + dev: false + + astro@4.5.9(sass@1.72.0)(typescript@5.4.3): dependencies: '@astrojs/compiler': 2.7.0 '@astrojs/internal-helpers': 0.3.0 @@ -3380,8 +3422,8 @@ snapshots: tsconfck: 3.0.3(typescript@5.4.3) unist-util-visit: 5.0.0 vfile: 6.0.1 - vite: 5.2.6 - vitefu: 0.2.5(vite@5.2.6) + vite: 5.2.6(sass@1.72.0) + vitefu: 0.2.5(vite@5.2.6(sass@1.72.0)) which-pm: 2.1.1 yargs-parser: 21.1.1 zod: 3.22.4 @@ -3450,8 +3492,7 @@ snapshots: is-decimal: 2.0.1 dev: false - binary-extensions@2.3.0: - dev: false + binary-extensions@2.3.0: {} bl@4.1.0: dependencies: @@ -3485,7 +3526,6 @@ snapshots: braces@3.0.2: dependencies: fill-range: 7.0.1 - dev: false browserslist@4.23.0: dependencies: @@ -3549,7 +3589,6 @@ snapshots: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 - dev: false chownr@1.1.4: dev: false @@ -3873,7 +3912,6 @@ snapshots: fill-range@7.0.1: dependencies: to-regex-range: 5.0.1 - dev: false find-up@4.1.0: dependencies: @@ -3900,7 +3938,6 @@ snapshots: dev: false fsevents@2.3.3: - dev: false optional: true function-bind@1.1.2: @@ -3927,7 +3964,6 @@ snapshots: glob-parent@5.1.2: dependencies: is-glob: 4.0.3 - dev: false globals@11.12.0: dev: false @@ -4208,6 +4244,8 @@ snapshots: ieee754@1.2.1: dev: false + immutable@4.3.5: {} + import-meta-resolve@4.0.0: dev: false @@ -4223,6 +4261,9 @@ snapshots: inline-style-parser@0.2.2: dev: false + is-absolute-url@4.0.1: + dev: false + is-alphabetical@2.0.1: dev: false @@ -4238,7 +4279,6 @@ snapshots: is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 - dev: false is-buffer@2.0.5: dev: false @@ -4257,8 +4297,7 @@ snapshots: is-extendable@0.1.1: dev: false - is-extglob@2.1.1: - dev: false + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: dev: false @@ -4266,7 +4305,6 @@ snapshots: is-glob@4.0.3: dependencies: is-extglob: 2.1.1 - dev: false is-hexadecimal@2.0.1: dev: false @@ -4279,8 +4317,7 @@ snapshots: is-interactive@2.0.0: dev: false - is-number@7.0.0: - dev: false + is-number@7.0.0: {} is-plain-obj@4.1.0: dev: false @@ -4952,8 +4989,7 @@ snapshots: node-releases@2.0.14: dev: false - normalize-path@3.0.0: - dev: false + normalize-path@3.0.0: {} not@0.1.0: dev: false @@ -5097,8 +5133,7 @@ snapshots: picocolors@1.0.0: dev: false - picomatch@2.3.1: - dev: false + picomatch@2.3.1: {} pify@4.0.1: dev: false @@ -5193,7 +5228,6 @@ snapshots: readdirp@3.6.0: dependencies: picomatch: 2.3.1 - dev: false rehype-parse@9.0.0: dependencies: @@ -5375,6 +5409,12 @@ snapshots: safe-buffer@5.2.1: dev: false + sass@1.72.0: + dependencies: + chokidar: 3.6.0 + immutable: 4.3.5 + source-map-js: 1.2.0 + sax@1.3.0: dev: false @@ -5449,8 +5489,7 @@ snapshots: sax: 1.3.0 dev: false - source-map-js@1.2.0: - dev: false + source-map-js@1.2.0: {} source-map@0.7.4: dev: false @@ -5461,6 +5500,19 @@ snapshots: sprintf-js@1.0.3: dev: false + starlight-links-validator@0.6.0(@astrojs/starlight@0.21.2(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)))(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)): + dependencies: + '@astrojs/starlight': 0.21.2(astro@4.5.9(sass@1.72.0)(typescript@5.4.3)) + astro: 4.5.9(sass@1.72.0)(typescript@5.4.3) + github-slugger: 2.0.0 + hast-util-from-html: 2.0.1 + hast-util-has-property: 3.0.0 + is-absolute-url: 4.0.1 + kleur: 4.1.5 + mdast-util-to-string: 4.0.0 + unist-util-visit: 5.0.0 + dev: false + stdin-discarder@0.1.0: dependencies: bl: 5.1.0 @@ -5592,7 +5644,6 @@ snapshots: to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - dev: false trim-lines@3.0.1: dev: false @@ -5789,18 +5840,19 @@ snapshots: vfile-message: 4.0.2 dev: false - vite@5.2.6: + vite@5.2.6(sass@1.72.0): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.13.0 + sass: 1.72.0 optionalDependencies: fsevents: 2.3.3 dev: false - vitefu@0.2.5(vite@5.2.6): + vitefu@0.2.5(vite@5.2.6(sass@1.72.0)): dependencies: - vite: 5.2.6 + vite: 5.2.6(sass@1.72.0) dev: false volar-service-css@0.0.34(@volar/language-service@2.1.5): diff --git a/docs/starlight/src/assets/icon.ico b/docs/starlight/src/assets/icon.ico new file mode 100644 index 0000000000..5751bc5f8d Binary files /dev/null and b/docs/starlight/src/assets/icon.ico differ diff --git a/docs/starlight/src/assets/icon.svg b/docs/starlight/src/assets/icon.svg new file mode 100644 index 0000000000..1801ca0be2 --- /dev/null +++ b/docs/starlight/src/assets/icon.svg @@ -0,0 +1,268 @@ + + + + diff --git a/docs/starlight/src/components/ScriptWorkaround.astro b/docs/starlight/src/components/ScriptWorkaround.astro new file mode 100644 index 0000000000..761053b3a7 --- /dev/null +++ b/docs/starlight/src/components/ScriptWorkaround.astro @@ -0,0 +1 @@ + diff --git a/docs/starlight/src/components/StatusComponent.astro b/docs/starlight/src/components/StatusComponent.astro new file mode 100644 index 0000000000..739754fee8 --- /dev/null +++ b/docs/starlight/src/components/StatusComponent.astro @@ -0,0 +1,33 @@ +--- +import "../styles/bulletin.scss"; +import { Icon } from '@astrojs/starlight/components'; +--- + +
+
+
+
+
+ +

公告栏

+
+ +
+
    +
  • + 新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~新建文件夹,嘿嘿~ +
  • +
+
+
+
+ + diff --git a/docs/starlight/src/content/docs/404.mdx b/docs/starlight/src/content/docs/404.mdx new file mode 100644 index 0000000000..3392c7b2bb --- /dev/null +++ b/docs/starlight/src/content/docs/404.mdx @@ -0,0 +1,10 @@ +--- +title: '404' +template: splash +editUrl: false +hero: + title: '404' + tagline: 页面未找到。请检查URL或尝试使用搜索栏。 +--- + +返回首页 diff --git a/docs/starlight/src/content/docs/en/guides/sillot/index.mdx b/docs/starlight/src/content/docs/en/guides/sillot/index.mdx new file mode 100644 index 0000000000..36aebf9cd5 --- /dev/null +++ b/docs/starlight/src/content/docs/en/guides/sillot/index.mdx @@ -0,0 +1,3 @@ +--- +title: 汐洛用户指南 +--- \ No newline at end of file diff --git "a/docs/starlight/src/content/docs/en/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" "b/docs/starlight/src/content/docs/en/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" new file mode 100644 index 0000000000..d3e3c877e2 --- /dev/null +++ "b/docs/starlight/src/content/docs/en/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" @@ -0,0 +1,30 @@ +--- +title: Please Start Here +--- + +## 🍫 Content block + +In SiYuan, the only important core concept is Content block. The content block can be formed through the formatting format, so that we can organize our thoughts and knowledge at the block-level granularity, and it is also convenient for reading and outputting long content. + +## 🍔 Start eating + +* Create a new notebook in the doc tree panel, and create a new doc under the notebook +* Enter / in the editor to trigger the function menu +* Navigate in the content block and Window and tab + +## 🍹 Drink recommend + +* FAQ +* [Origin](https://ld246.com/article/1619868273581) (in Chinese) + +## 🏘️ Our home + +* [LiuYun](https://liuyun.io/) +* [Twitter](https://twitter.com/b3logos) + +## 💌 Contribution + +* Open source +* [Pay to support development](https://b3log.org/siyuan/en/pricing.html) + +We hope that in the coming time, SiYuan can become an efficient tool for your life and study, helping you achieve more goals and plans🙏 diff --git a/docs/starlight/src/content/docs/guides/example.md b/docs/starlight/src/content/docs/guides/example.md deleted file mode 100644 index ebd0f3bc76..0000000000 --- a/docs/starlight/src/content/docs/guides/example.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Example Guide -description: A guide in my new Starlight docs site. ---- - -Guides lead a user through a specific task they want to accomplish, often with a sequence of steps. -Writing a good guide requires thinking about what your users are trying to do. - -## Further reading - -- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework diff --git a/docs/starlight/src/content/docs/guides/sillot/index.mdx b/docs/starlight/src/content/docs/guides/sillot/index.mdx new file mode 100644 index 0000000000..36aebf9cd5 --- /dev/null +++ b/docs/starlight/src/content/docs/guides/sillot/index.mdx @@ -0,0 +1,3 @@ +--- +title: 汐洛用户指南 +--- \ No newline at end of file diff --git "a/docs/starlight/src/content/docs/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" "b/docs/starlight/src/content/docs/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" new file mode 100644 index 0000000000..733b70f94f --- /dev/null +++ "b/docs/starlight/src/content/docs/guides/siyuan/\350\257\267\344\273\216\350\277\231\351\207\214\345\274\200\345\247\213.md" @@ -0,0 +1,33 @@ +--- +title: 请从这里开始 +description: A guide in my new Starlight docs site. +--- + +## 🍫 内容块 + +在思源中,唯一重要的核心概念是内容块。通过排版格式即可形成内容块,这样我们就能在块级粒度上对思绪和知识进行整理,同时也能方便长文阅读和输出。 + +## 🍔 开始食用 + +* 在文档树面板中新建笔记本,在笔记本下新建文档 +* 在编辑器中输入 / 触发功能菜单 +* 在内容块中遨游、窗口和页签 + +## 🍹 饮品推荐 + +* 常见问题 +* [缘起](https://ld246.com/article/1619868273581) + +## 🏘️ 我们的家 + +* [链滴(中文反馈)](https://ld246.com/article/1649901726096) +* [用户社区汇总](https://ld246.com/article/1640266171309) + +## 💌 参与贡献 + +* 思源笔记完全开源 +* [付费支持开发](https://b3log.org/siyuan/pricing.html) + +如果你感到官方用户指南过于硬核,请尝试从社区资源开始。 + +我们希望在接下来的时间里,思源能够成为你生活和学习的效率工具,帮助你实现更多的目标和计划🙏 diff --git a/docs/starlight/src/content/docs/index.mdx b/docs/starlight/src/content/docs/index.mdx index aca530e102..e741d7eb54 100644 --- a/docs/starlight/src/content/docs/index.mdx +++ b/docs/starlight/src/content/docs/index.mdx @@ -3,12 +3,17 @@ title: 汐洛 description: Get started building your docs site with Starlight. template: splash hero: - tagline: 为新彖务服务 + tagline: | + 为新彖务服务 +
+ Born for + InfoSec Professionals. +
image: file: ../../assets/houston.webp actions: - text: 开始吧 - link: /guides/example/ + link: /guides/siyuan/请从这里开始 icon: right-arrow variant: primary - text: Read the Starlight docs @@ -17,9 +22,13 @@ hero: --- import { Card, CardGrid } from '@astrojs/starlight/components'; -import SpeedInsights from "@vercel/speed-insights/astro" +import SpeedInsights from "@vercel/speed-insights/astro"; +import ScriptWorkaround from "/src/components/ScriptWorkaround.astro"; +import StatusComponent from "/src/components/StatusComponent.astro"; -## Next steps + + +{/* ## Next steps @@ -34,5 +43,7 @@ import SpeedInsights from "@vercel/speed-insights/astro" Learn more in [the Starlight Docs](https://starlight.astro.build/). - - \ No newline at end of file + */} + + + diff --git "a/docs/starlight/src/content/docs/\346\261\220\346\264\233\345\256\235\345\205\270/\345\274\200\345\217\221\350\200\205\346\214\207\345\215\227/\345\274\200\345\217\221\350\200\205\350\241\214\344\270\272\350\247\204\350\214\203.md" "b/docs/starlight/src/content/docs/\346\261\220\346\264\233\345\256\235\345\205\270/\345\274\200\345\217\221\350\200\205\346\214\207\345\215\227/\345\274\200\345\217\221\350\200\205\350\241\214\344\270\272\350\247\204\350\214\203.md" index 20e4280234..5a63c71709 100644 --- "a/docs/starlight/src/content/docs/\346\261\220\346\264\233\345\256\235\345\205\270/\345\274\200\345\217\221\350\200\205\346\214\207\345\215\227/\345\274\200\345\217\221\350\200\205\350\241\214\344\270\272\350\247\204\350\214\203.md" +++ "b/docs/starlight/src/content/docs/\346\261\220\346\264\233\345\256\235\345\205\270/\345\274\200\345\217\221\350\200\205\346\214\207\345\215\227/\345\274\200\345\217\221\350\200\205\350\241\214\344\270\272\350\247\204\350\214\203.md" @@ -1,5 +1,12 @@ --- title: 开发者行为规范 +sidebar: +# 为链接设置自定义顺序(数字越小显示在上方) + order: 2 + # 为链接添加徽章 + badge: + text: New + variant: tip --- 在软件开发过程中,我们鼓励每一位开发者严格遵守以下行为规范,以确保合作的高效性和团队之间的良好沟通: diff --git a/docs/starlight/src/content/i18n/en.json b/docs/starlight/src/content/i18n/en.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/docs/starlight/src/content/i18n/en.json @@ -0,0 +1,2 @@ +{ +} diff --git a/docs/starlight/src/content/i18n/zh-CN.json b/docs/starlight/src/content/i18n/zh-CN.json new file mode 100644 index 0000000000..2c63c08510 --- /dev/null +++ b/docs/starlight/src/content/i18n/zh-CN.json @@ -0,0 +1,2 @@ +{ +} diff --git a/docs/starlight/src/javascript/utils.js b/docs/starlight/src/javascript/utils.js new file mode 100644 index 0000000000..c0c2f4daaf --- /dev/null +++ b/docs/starlight/src/javascript/utils.js @@ -0,0 +1,64 @@ +document.addEventListener('DOMContentLoaded', (event) => { + const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + const word = document.querySelector("#changing_text"); + const texts = ["InfoSec Professionals.", "Bug Bounty Hunters.", "Passionate Students.", "Spicy Hackers."]; + let textIndex = 0; + + let isAnimating = false; + let rafID; + let then = Date.now(); + const interval = 10; + + const animate = () => { + isAnimating = true; + let iterations = 0; + const originalText = texts[textIndex]; + + const changeLetter = () => { + let now = Date.now(); + let elapsed = now - then; + + if (elapsed > interval) { + word.innerText = originalText + .split("") + .map((letter, index) => { + if (index < iterations) { + return originalText[index]; + } + if (letter === " ") { + return " "; + } + return letters[Math.floor(Math.random() * 22)]; + }) + .join(""); + + iterations += 1 / 3; + then = now - (elapsed % interval); + } + + if (iterations < word.innerText.length && isAnimating) { + rafID = requestAnimationFrame(changeLetter); + } + } + + rafID = requestAnimationFrame(changeLetter); + } + + animate(); + + setInterval(() => { + textIndex = (textIndex + 1) % texts.length; + if (!document.hidden) { + animate(); + } + }, 4000); + + document.addEventListener('visibilitychange', function() { + if (document.hidden) { + isAnimating = false; + cancelAnimationFrame(rafID); + } else { + animate(); + } + }); +}); diff --git a/docs/starlight/src/styles/bulletin.scss b/docs/starlight/src/styles/bulletin.scss new file mode 100644 index 0000000000..7cfee8c79e --- /dev/null +++ b/docs/starlight/src/styles/bulletin.scss @@ -0,0 +1,115 @@ +html, +body { + height: 100%; + margin: 0; /* Ensure no default browser margin */ +} + +.rectangle { + position: absolute; + top: 5rem; + right: 1rem; + display: flex; + align-items: center; + justify-content: flex-start; + width: 2em; + max-height: 12em; + background: #17181c5b; /* Semi-transparent white background */ + backdrop-filter: blur(10px); /* Apply blur effect */ + border: 1px solid #353841; /* Optional: add a subtle border for more glassy effect */ + transform: scale(0); + border-radius: 50%; + animation: scale-in 0.3s ease-out forwards, + expand 0.35s 0.25s ease-out forwards; +} + +.notification-content { + display: flex; + flex-direction: column; + padding: 0.5rem; + animation: fade-in 0.65s ease-in forwards; + height: 100%; + width: 100%; + + .icon-title { + display: flex; + align-items: center; + justify-content: space-between; + gap: 0.3rem; + font-size: 1.2em; + margin-bottom: 0.4rem; + + .info-group { + display: flex; + align-items: center; + gap: 0.3rem; + } + + h4 { + font-size: 1em; + } + + .close-icon { + cursor: pointer; + } + } + + .notification-list { + margin: 0 !important; + padding: 0 !important; + margin-right: 0.15rem !important; + display: flex; + flex-direction: column; + gap: 0.2rem; + list-style-type: none; + max-height: 8em; + overflow-y: scroll; + overflow-x: hidden; + font-size: 0.9em; + + &::-webkit-scrollbar { + width: 0.3em; + } + + &::-webkit-scrollbar-track { + background: transparent; + } + + &::-webkit-scrollbar-thumb { + background: #353841; + border-radius: 0.2em; + } + } +} + +@keyframes scale-in { + 100% { + transform: scale(1); + opacity: 1; + } +} + +@keyframes expand { + 50% { + width: 350px; + border-radius: 6px; + } + 100% { + width: 300px; + border-radius: 8px; + } +} + +@keyframes fade-in { + 0% { + opacity: 0; + } + 100% { + opacity: 0.8; + } +} + +@media only screen and (max-device-width: 541px) { + .container { + display: none; + } +} diff --git a/docs/starlight/tsconfig.json b/docs/starlight/tsconfig.json index 77da9dd009..2b146b07f0 100644 --- a/docs/starlight/tsconfig.json +++ b/docs/starlight/tsconfig.json @@ -1,3 +1,10 @@ { - "extends": "astro/tsconfigs/strict" -} \ No newline at end of file + "extends": "astro/tsconfigs/strict", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@components/*": ["src/components/*"], + "@assets/*": ["src/assets/*"] + } + } +}