# Blog **Repository Path**: gitgreat/blog ## Basic Information - **Project Name**: Blog - **Description**: 个人博客,开放预览, - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: https://www.sofile.cn - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-26 - **Last Updated**: 2025-12-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 介绍 使用 Astro 构建的个人博客 # 准备实现的功能 - [草稿](https://johndalesandro.com/blog/astro-manage-draft-and-published-post-statuses-by-adding-a-content-collection-schema-property/) - [结构化数据](https://johndalesandro.com/blog/astro-add-json-ld-structured-data-to-your-website-for-rich-search-results/) - [相关文章](https://johndalesandro.com/blog/astro-add-related-posts-to-blog-entries/) - 搜索功能,本地索引(构建期生成 JSON)就够 - 嵌入 Excalidraw(示意图) - 代码主题切换 - 添加说说功能 - 进行SEO改造 # 相关文章 - [为啥选择 Astro 而不是 Vuepress?](https://johndalesandro.com/blog/why-i-switched-from-wordpress-to-astro/) ## 撰写教程 去掉博客链接中的blog路径:https://chatgpt.com/s/t_693d0b404c748191b78008f97a5e09bb ```sh npm create astro@latest -- --template blog ``` > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! Features: - ✅ Minimal styling (make it your own!) - ✅ 100/100 Lighthouse performance - ✅ SEO-friendly with canonical URLs and OpenGraph data - ✅ Sitemap support - ✅ RSS Feed support - ✅ Markdown & MDX support ## 🚀 Project Structure Inside of your Astro project, you'll see the following folders and files: ```text ├── public/ ├── src/ │   ├── components/ │   ├── content/ │   ├── layouts/ │   └── pages/ ├── astro.config.mjs ├── README.md ├── package.json └── tsconfig.json ``` Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more. Any static assets, like images, can be placed in the `public/` directory. ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:4321` | | `npm run build` | Build your production site to `./dist/` | | `npm run preview` | Preview your build locally, before deploying | | `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | | `npm run astro -- --help` | Get help using the Astro CLI | ## 👀 Want to learn more? Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). ## Credit This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/).