diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6cf357a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) sun0225SUN + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 616b9e7..7e2df4b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,179 @@ -## todo +# Astro Air -[![Netlify Status](https://api.netlify.com/api/v1/badges/de94319e-7049-462a-8022-817fe915045c/deploy-status)](https://app.netlify.com/sites/blog-air/deploys) \ No newline at end of file +A minimalism, personal blog theme for Astro + +[![Built with Astro](https://astro.badg.es/v1/built-with-astro/tiny.svg)](https://astro.build) [![Netlify Status](https://api.netlify.com/api/v1/badges/a4eb6e88-606d-4ea6-9a53-179e03a7e2ef/deploy-status)](https://app.netlify.com/sites/astro-air/deploys) + +> +> If you find this project helpful, please consider giving it a star ⭐️ + +## Showcase + +- [Astro Air](https://astro-air.guoqi.dev) +- [Guoqi's blog](https://blog.sunguoqi.com) +- ... + +> welcome to add your own blog to the list ❀️ + +## Features + +- [x] πŸŒ“ Dark mode support +- [x] πŸ“± Fully device responsive +- [x] 🎨 Clean and minimalist design +- [x] πŸ“ Markdown/MDX for content authoring +- [x] πŸ„β€β™‚οΈ SSG static rendering, SEO friendly +- [x] 🌐 i18n support (EN/ZH) +- [x] πŸ”— Social media integration +- [x] πŸ“° RSS feed & sitemap support +- [x] πŸ› οΈ Google analysis integration +- [ ] πŸ” Local search functionality +- [ ] πŸ’¬ Commenting Integration +- [ ] 🎨 Enhance Transition and Animation +- [ ] ...and more + +## Quick Start + + [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/sun0225SUN/astro-air) + + [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/sun0225SUN/astro-air) + + +## Configuration + +### Common Settings + +1. Open `src/config/index.ts` and customize your site settings: + +```typescript +export const common = { + meta: { + favicon: "/favicon.ico", + url: "https://blog.sunguoqi.com", + }, + googleAnalyticsId: "G-W37MQ05DRE", + social: [ + { + icon: Twitter, + label: "X", + link: "https://x.com/sun0225SUN", + }, + { + icon: Github, + label: "GitHub", + link: "https://github.com/sun0225SUN", + }, + ], + rss: true, + navigation: { + home: true, + archive: true, + custom: [ + { + label: "CamLife", + link: "https://camlife.cn", + }, + ], + about: true, + }, + latestPosts: 8, +} +``` + +### ZH Settings + +```typescript +export const zh = { + ...common, + siteName: "ε°ε­™εŒε­¦", + meta: { + ...common.meta, + title: "ε°ε­™εŒε­¦", + slogan: "δΈ€δΈͺζ΅ͺζΌ«ηš„η†ζ€§δΈ»δΉ‰θ€…", + description: "θ―»δΉ¦γ€ζ‘„ε½±γ€ηΌ–η¨‹γ€ζ—…θ‘Œ", + }, + navigation: { + ...common.navigation, + custom: [ + { + label: "影集", + link: "https://camlife.cn", + }, + ], + }, +} +``` + +### EN Settings + +```typescript +export const en = { + ...common, + siteName: "Guoqi Sun", + meta: { + ...common.meta, + title: "Guoqi Sun", + slogan: "A Romantic Rationalist", + description: "Reading, Photography, Programming, Traveling", + }, + navigation: { + ...common.navigation, + custom: [ + { + label: "CamLife", + link: "https://camlife.cn", + }, + ], + }, +} +``` + +## Writing Content + +1. Create new blog posts in the `src/content/posts/` directory +2. Use the following frontmatter template: + +```markdown +--- +title: "Your Post Title" +description: "A brief description of your post" +pubDate: YYYY-MM-DD +updatedDate(optional): YYYY-MM-DD +tags(optional): ["tag1", "tag2"] +ogImage(optional): "cover image URL" +--- + +Your content here... +``` + +## Update Theme + +```bash +git remote add upstream https://github.com/sun0225SUN/astro-air + +git fetch upstream + +git merge upstream/main --allow-unrelated-histories + +``` + +## Contributing + +Contributions are welcome! Feel free to: + +1. Fork the repository +2. Create your feature branch +3. Submit a pull request + +```bash +git clone https://github.com/sun0225SUN/astro-air + +cd astro-air + +pnpm install + +pnpm dev +``` + +## License + +This project is licensed under the MIT License - see the LICENSE file for details.