diff --git a/.editorconfig b/.editorconfig
deleted file mode 100644
index 53fe054..0000000
--- a/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-# EditorConfig is awesome: https://EditorConfig.org
-
-# top-most EditorConfig file
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = false
-insert_final_newline = true
\ No newline at end of file
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
deleted file mode 100644
index 269cede..0000000
--- a/.eslintrc.cjs
+++ /dev/null
@@ -1,20 +0,0 @@
-/* eslint-env node */
-require("@rushstack/eslint-patch/modern-module-resolution");
-
-module.exports = {
- root: true,
- extends: [
- "plugin:vue/vue3-essential",
- "eslint:recommended",
- "@vue/eslint-config-typescript/recommended",
- "@vue/eslint-config-prettier",
- ],
- env: {
- node: true,
- "vue/setup-compiler-macros": true,
- },
- rules: {
- "vue/multi-word-component-names": 0,
- "@typescript-eslint/ban-ts-comment": 0,
- },
-};
diff --git a/.gitignore b/.gitignore
index f828697..a0cee65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,29 +1,24 @@
-# Logs
-logs
-*.log
+# build output
+dist/
+# generated types
+.astro/
+
+# dependencies
+node_modules/
+
+# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
-lerna-debug.log*
-node_modules
+
+# environment variables
+.env
+.env.production
+
+# macOS-specific files
.DS_Store
-dist
-dist-ssr
-histoire-dist
-coverage
-*.local
-/cypress/videos/
-/cypress/screenshots/
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
+# jetbrains setting folder
+.idea/
\ No newline at end of file
diff --git a/.npmrc b/.npmrc
deleted file mode 100644
index ef83021..0000000
--- a/.npmrc
+++ /dev/null
@@ -1,2 +0,0 @@
-# Expose Astro dependencies for `pnpm` users
-shamefully-hoist=true
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 0000000..bde9e3f
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,3 @@
+templates/
+pnpm-lock.yaml
+pnpm-workspace.yaml
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index d642209..0000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- "command": "./node_modules/.bin/astro dev",
- "name": "Development server",
- "request": "launch",
- "type": "node-terminal"
- }
- ]
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..8f50254
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,6 @@
+{
+ "emmet.includeLanguages": {
+ "astro": "html"
+ },
+ "i18n-ally.localesPaths": ["demo-themes/theme-earth/i18n"]
+}
diff --git a/README.md b/README.md
index 011d75a..6d3f665 100644
--- a/README.md
+++ b/README.md
@@ -1,60 +1 @@
-# theme-astro-starter(Experimental)
-
-Halo 2.0 基于 [Astro](https://astro.build) 和 [Thymeleaf](https://www.thymeleaf.org/) 的主题快速开始模板。
-
-> 目前还处于实验和探索的阶段。
-
-## 原理
-
-1. Astro 作为 SSG 渲染框架,用于组件封装、页面框架组织、静态页面生成、静态资源的构建。
-2. Thymeleaf 作为后端页面渲染框架,并且负责提供数据进行页面数据的渲染。由于 Thymeleaf 的语法是基于 HTML 元素的 Attributes 扩展,所以理论上并不会破坏 HTML 的结构。那么就可以在 Astro 组件中使用 Halo 提供的数据和页面进行绑定。这样就实现了在开发环境并不依赖于 Halo 后端,可以在开发过程中保留 hmr。并且可以做到在构建之后可以直接给 Halo 使用。
-
-## 特性
-
-1. 得益于 Astro 框架,可以使用现代的前端技术栈开发页面。包括但不限于 Vue React Svelte 等,意味着可以使用这些现代前端框架进行组件开发。
-2. 在开发环境可以实现 hmr。
-3. 在构建页面之后,会自动处理构建产物的资源地址,转换为 Thymeleaf 可识别的语法。
-4. 最终构建的产物可通过 HTML 直接访问,也可以部署在任何静态页面服务器,可作为页面预览原型。但因为没有经过 Halo 进行数据绑定,所以没有数据填充。
-
-## 开发
-
-项目结构:
-
-```text
-├── astro.config.mjs Astro 配置文件
-├── package.json
-├── pnpm-lock.yaml
-├── src
-│ ├── components
-│ │ ├── Card.astro
-│ │ └── PostCard.vue Vue 3 组件
-│ ├── layouts Astro 布局组件
-│ │ └── Layout.astro
-│ └── pages
-│ ├── index.astro Astro 页面组件
-│ └── post.astro
-├── templates
-│ ├── assets bundle 之后的静态资源文件
-│ │ ├── 4669d51c.dbc606a6.css
-│ │ ├── PostCard.42ac9187.js
-│ │ ├── chunks
-│ │ │ └── runtime-core.esm-bundler.e59bb94c.js
-│ │ └── client.e67fc49c.js
-│ ├── favicon.ico
-│ ├── index.html 构建之后的静态页面,作为 Thymeleaf 渲染模板
-│ └── post.html
-├── theme.yaml 主题描述文件
-└── tsconfig.json
-```
-
-```bash
-git clone https://github.com/ruibaby/theme-astro-starter
-
-pnpm install
-
-# 启动 Vite 开发环境
-pnpm dev
-
-# 构建最终产物,构建之后可以直接在 Halo 当中安装使用
-pnpm build
-```
+WIP
\ No newline at end of file
diff --git a/astro.config.mjs b/astro.config.mjs
index 8e9525c..d2c6c2e 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -1,16 +1,14 @@
+// @ts-check
import { defineConfig } from "astro/config";
-import vue from "@astrojs/vue";
-import tailwind from "@astrojs/tailwind";
-import astroHaloThemeIntegration from "@halo-dev/astro-halo-theme-integration";
-// https://astro.build/config
+import vue from "@astrojs/vue";
+
export default defineConfig({
- integrations: [vue(), tailwind(), astroHaloThemeIntegration()],
- outDir: "./templates",
+ base: "/themes/astro-starter",
build: {
+ assets: "assets",
format: "file",
},
- server: {
- port: 4000,
- },
+ outDir: "./templates",
+ integrations: [vue()],
});
diff --git a/env.d.ts b/env.d.ts
deleted file mode 100644
index 9f8f1e2..0000000
--- a/env.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-///
- 没有经过 Astro 渲染,原生使用 Thymeleaf 语法。在构建时,将被 Copy 到 - templates 目录。(Native) -
- - diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 578ad45..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/settings.yaml b/settings.yaml deleted file mode 100644 index 6a82103..0000000 --- a/settings.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: v1alpha1 -kind: Setting -metadata: - name: theme-astro-starter-setting -spec: - - group: basic - label: 基本设置 - formSchema: - - $el: h2 - children: Welcome to Theme Astro Starter World - - $formkit: select - name: sidebar_width - label: 侧边栏宽度 - options: - '20': 20% - '30': 30% - '40': 40% - '50': 50% - - $formkit: text - name: sidebar_background - label: 侧边栏背景图 - - $formkit: text - name: top_logo - label: 左上角图标 - - $formkit: radio - name: circle_avatar - label: 原型头像 - options: - - label: 开启 - value: true - - label: 关闭 - value: false - value: false - - $formkit: radio - name: katex - label: KaTex 公式渲染 - options: - - label: 开启 - value: true - - label: 关闭 - value: false - value: false - - $formkit: textarea - name: codeblock_highlight_languages - label: 文章代码高亮语言 - help: >- - 默认已经包含:php,diff,java,css,bash,json,perl,swift,plaintext,ruby,yaml,sql,vbnet,ini,scss,less,cpp,typescript,csharp,rust,python,python-repl,objectivec,r,shell,makefile,go,xml,markdown,lua,javascript,php-template,kotlin,c - 如果需要添加其他语言,请按照相同格式添加。 - - group: social - label: 社交资料 - formSchema: - - $formkit: radio - name: rss - label: RSS - options: - - label: 开启 - value: true - - label: 关闭 - value: false - value: true - - $formkit: text - name: twitter - label: Twitter - - $formkit: text - name: telegram - label: Telegram - - $formkit: text - name: github - label: GitHub - - $formkit: text - name: email - label: Email diff --git a/src/components/Card.astro b/src/components/Card.astro deleted file mode 100644 index 44c35e0..0000000 --- a/src/components/Card.astro +++ /dev/null @@ -1,74 +0,0 @@ ---- -export interface Props { - title: string; - body: string; - href: string; -} -const { href, title, body } = Astro.props; ---- - -- {body} -
- -+
+ + +
- Check out the src/pages directory to get started.
- Code Challenge: Tweak the "Welcome to Astro" message above.
-
- Onions -
-+
+ + +{data.name}
-{data.description}
-+
+ + +- 没有经过 Astro 渲染,原生使用 Thymeleaf 语法。在构建时,将被 Copy 到 - templates 目录。(Native) -
- - diff --git a/templates/archives.html b/templates/archives.html new file mode 100644 index 0000000..8401a3e --- /dev/null +++ b/templates/archives.html @@ -0,0 +1,13 @@ +B?gt(o,b,y,!0,!1,P):N(u,p,v,b,y,E,C,w,P)},jt=(o,u,p,v,b,y,E,C,w)=>{let m=0;const B=u.length;let P=o.length-1,A=B-1;for(;m<=P&&m<=A;){const H=o[m],q=u[m]=w?He(u[m]):ve(u[m]);if(qe(H,q))R(H,q,p,null,b,y,E,C,w);else break;m++}for(;m<=P&&m<=A;){const H=o[P],q=u[A]=w?He(u[A]):ve(u[A]);if(qe(H,q))R(H,q,p,null,b,y,E,C,w);else break;P--,A--}if(m>P){if(m<=A){const H=A+1,q=HA)for(;m<=P;)Pe(o[m],b,y,!0),m++;else{const H=m,q=m,Z=new Map;for(m=q;m<=A;m++){const xe=u[m]=w?He(u[m]):ve(u[m]);xe.key!=null&&Z.set(xe.key,m)}let z,ie=0;const le=A-q+1;let we=!1,me=0;const _t=new Array(le);for(m=0;m
- Check out the
- Learn how Astro works and explore the official API docs.
-
- Supercharge your project with new frameworks and libraries.
-
- Explore a galaxy of community-built starter themes.
-
- Come say hi to our amazing Discord community. ❤️
-
- Onions
-分类
Welcome to Astro
- src/pages directory to get started.
- Code Challenge: Tweak the "Welcome to Astro" message above.
-
-
-
- Documentation
- →
-
-
- Integrations
- →
-
-
- Themes
- →
-
-
- Chat
- →
-
-
-
-
-
-
- 标签