diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/settings.json b/.vscode/settings.json index b91cc0d..f265668 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,5 +18,8 @@ "quickfix.biome": "always", "source.organizeImports.biome": "always" }, - "frontMatter.dashboard.openOnStart": false + "frontMatter.dashboard.openOnStart": false, + "[css]": { + "editor.defaultFormatter": "vscode.css-language-features" + } } diff --git a/astro.config.mjs b/astro.config.mjs index 621c415..5d02ae8 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -26,7 +26,7 @@ import { pluginCustomCopyButton } from "./src/plugins/expressive-code/custom-cop // https://astro.build/config export default defineConfig({ - site: "https://fuwari.vercel.app/", + site: "https://adclosenn.top", base: "/", trailingSlash: "always", integrations: [ diff --git a/docs/README.es.md b/docs/README.es.md deleted file mode 100644 index 8734530..0000000 --- a/docs/README.es.md +++ /dev/null @@ -1,85 +0,0 @@ -# 🍥Fuwari - -Un tema estático para blogs construido con [Astro](https://astro.build). - -[**🖥️ Demostración en Vivo (Vercel)**](https://fuwari.vercel.app) - -![Imagen de Vista Previa](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ Características - -- [x] Construido con [Astro](https://astro.build) y [Tailwind CSS](https://tailwindcss.com) -- [x] Animaciones suaves y transiciones de página -- [x] Modo claro / oscuro -- [x] Colores del tema y banner personalizables -- [x] Diseño responsivo -- [ ] Comentarios -- [x] Buscador -- [x] TOC (Tabla de Contenidos) - -## 👀 requiere - -- Node.js <= 22 -- pnpm <= 9 - -## 🚀 Cómo Usar 1 - -Inicializa el proyecto localmente usando [create-fuwari](https://github.com/L4Ph/create-fuwari). - -```sh -# npm -npm create fuwari@latest. - -# yarn -yarn create fuwari. - -# pnpm -pnpm create fuwari@latest - -# bun -bun create fuwari@latest - -# deno -deno run -A npm:create-fuwari@latest -``` - -1. Edita el archivo de configuración `src/config.ts` para personalizar tu blog. -2. Ejecuta `pnpm new-post ` para crear una nueva entrada y edítala en `src/content/posts/`. -3. Despliega tu blog en Vercel, Netlify, GitHub Pages, etc., siguiendo [las guías](https://docs.astro.build/en/guides/deploy/). Necesitas editar la configuración del sitio en `astro.config.mjs` antes del despliegue. - -## 🚀 Cómo Usar 2 - -1. [Genera un nuevo repositorio](https://github.com/saicaca/fuwari/generate) desde esta plantilla o haz un fork de este repositorio. -2. Para editar tu blog localmente, clona tu repositorio, ejecuta `pnpm install` y `pnpm add sharp` para instalar las dependencias. - - Instala [pnpm](https://pnpm.io) `npm install -g pnpm` si aún no lo tienes. -3. Edita el archivo de configuración `src/config.ts` para personalizar tu blog. -4. Ejecuta `pnpm new-post ` para crear una nueva entrada y edítala en `src/content/posts/`. -5. Despliega tu blog en Vercel, Netlify, GitHub Pages, etc., siguiendo [las guías](https://docs.astro.build/en/guides/deploy/). Necesitas editar la configuración del sitio en `astro.config.mjs` antes del despliegue. - -## ⚙️ Cabecera de las Entradas - -```yaml ---- -title: Mi Primer Post en el Blog -published: 2023-09-09 -description: Esta es la primera entrada de mi nuevo blog con Astro. -image: /images/cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false ---- -``` - -## 🧞 Comandos - -Todos los comandos se ejecutan desde la raíz del proyecto, desde una terminal: - -| Comando | Acción | -|:------------------------------------|:--------------------------------------------------| -| `pnpm install` y `pnpm add sharp` | Instala las dependencias | -| `pnpm dev` | Inicia el servidor de desarrollo local en `localhost:4321` | -| `pnpm build` | Compila tu web para producción en `./dist/` | -| `pnpm preview` | Previsualiza la web localmente, antes del despliegue | -| `pnpm new-post ` | Crea una nueva entrada | -| `pnpm astro ...` | Ejecuta comandos CLI como `astro add`, `astro check` | -| `pnpm astro --help` | Obtén ayuda para usar el CLI de Astro | diff --git a/docs/README.id.md b/docs/README.id.md deleted file mode 100644 index 0180568..0000000 --- a/docs/README.id.md +++ /dev/null @@ -1,106 +0,0 @@ -# 🍥 Fuwari - -Template blog statis yang dibangun dengan [Astro](https://astro.build). - -[**🖥️ Demo Langsung (Vercel)**](https://fuwari.vercel.app) - -![Gambar Pratinjau](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -🌏 README dalam -[**中文**](https://github.com/saicaca/fuwari/blob/main/docs/README.zh-CN.md) / -[**日本語**](https://github.com/saicaca/fuwari/blob/main/docs/README.ja.md) / -[**한국어**](https://github.com/saicaca/fuwari/blob/main/docs/README.ko.md) / -[**Español**](https://github.com/saicaca/fuwari/blob/main/docs/README.es.md) / -[**ไทย**](https://github.com/saicaca/fuwari/blob/main/docs/README.th.md) / -[**Tiếng Việt**](https://github.com/saicaca/fuwari/blob/main/docs/README.vi.md) / -**Bahasa Indonesia (ini)** (Disediakan oleh komunitas, mungkin tidak selalu paling mutakhir) - -## ✨ Fitur - -- [x] Dibangun dengan [Astro](https://astro.build) dan [Tailwind CSS](https://tailwindcss.com) -- [x] Animasi dan transisi halaman yang halus -- [x] Mode terang / gelap -- [x] Warna tema & banner yang bisa dikustomisasi -- [x] Desain responsif -- [x] Fitur pencarian dengan [Pagefind](https://pagefind.app/) -- [x] [Fitur markdown tambahan](#-markdown-sintaks-ekstensi) -- [x] Daftar isi (Table of Contents) -- [x] RSS feed - -## 🚀 Memulai - -1. Buat repositori blog kamu: - - [Generate repositori baru](https://github.com/saicaca/fuwari/generate) dari template ini atau fork repositori ini. - - Atau jalankan salah satu perintah berikut: - ```sh - # npm - npm create fuwari@latest. - - # yarn - yarn create fuwari. - - # pnpm - pnpm create fuwari@latest - - # bun - bun create fuwari@latest - - # deno - deno run -A npm:create-fuwari@latest - ``` -2. Untuk mengedit blog secara lokal, klon repositori kamu, jalankan `pnpm install` untuk instalasi dependensi. - - Install [pnpm](https://pnpm.io) `npm install -g pnpm` jika belum punya. -3. Edit file konfigurasi `src/config.ts` untuk menyesuaikan blog. -4. Jalankan `pnpm new-post ` untuk membuat postingan baru dan edit di `src/content/posts/`. -5. Deploy blog ke Vercel, Netlify, GitHub Pages, dll. sesuai [panduan](https://docs.astro.build/en/guides/deploy/). Jangan lupa edit konfigurasi situs di `astro.config.mjs` sebelum deploy. - -## 📝 Frontmatter Postingan - -```yaml ---- -title: Judul Postingan Pertama Saya -published: 2023-09-09 -description: Ini adalah postingan pertama blog Astro saya. -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false -lang: id # Isi hanya jika bahasa postingan berbeda dari bahasa default di `config.ts` ---- -``` - -## 🧩 Markdown Sintaks Ekstensi - -Selain dukungan default Astro untuk [GitHub Flavored Markdown](https://github.github.com/gfm/), terdapat beberapa fitur tambahan: - -- Admonisi ([Pratinjau & Cara Pakai](https://fuwari.vercel.app/posts/markdown-extended/#admonitions)) -- Kartu repositori GitHub ([Pratinjau & Cara Pakai](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards)) -- Kode blok ekspresif lewat Expressive Code ([Pratinjau](https://fuwari.vercel.app/posts/expressive-code/) / [Dokumentasi](https://expressive-code.com/)) - -## ⚡ Perintah - -Semua perintah dijalankan dari root proyek, via terminal: - -| Perintah | Aksi | -|:-----------------------------|:----------------------------------------------------------| -| `pnpm install` | Instalasi dependensi | -| `pnpm dev` | Menjalankan server dev lokal di `localhost:4321` | -| `pnpm build` | Build untuk produksi ke folder `./dist/` | -| `pnpm preview` | Pratinjau hasil build sebelum deploy | -| `pnpm check` | Cek error atau masalah di kode | -| `pnpm format` | Format kode dengan Biome | -| `pnpm new-post ` | Membuat postingan baru | -| `pnpm astro ...` | Jalankan perintah CLI seperti `astro add`, `astro check` | -| `pnpm astro --help` | Bantuan menggunakan Astro CLI | - -## ✏️ Kontribusi - -Lihat [Panduan Kontribusi](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md) untuk detail tentang cara berkontribusi ke proyek ini. - -## 📄 Lisensi - -Proyek ini dilisensikan di bawah MIT License. - ---- - -> Dokumentasi ini tersedia dalam Bahasa Indonesia. Untuk bahasa lain, lihat README di direktori docs. diff --git a/docs/README.ja.md b/docs/README.ja.md deleted file mode 100644 index 87a3d7f..0000000 --- a/docs/README.ja.md +++ /dev/null @@ -1,85 +0,0 @@ -# 🍥Fuwari - -[Astro](https://astro.build) で構築された静的ブログテンプレート - -[**🖥️ライブデモ (Vercel)**](https://fuwari.vercel.app) - -![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ 特徴 - -- [x] [Astro](https://astro.build) 及び [Tailwind CSS](https://tailwindcss.com) で構築 -- [x] スムーズなアニメーションとページ遷移 -- [x] ライト/ダークテーマ対応 -- [x] カスタマイズ可能なテーマカラーとバナー -- [x] レスポンシブデザイン -- [ ] コメント機能 -- [x] 検索機能 -- [x] 目次 - -## 👀 以下が必要 - -- Node.js <= 22 -- pnpm <= 9 - -## 🚀 使用方法 1 - -[create-fuwari](https://github.com/L4Ph/create-fuwari)を使用して、ローカルにプロジェクトを初期化します。 - -```sh -# npm -npm create fuwari@latest - -# yarn -yarn create fuwari - -# pnpm -pnpm create fuwari@latest - -# bun -bun create fuwari@latest - -# deno -deno run -A npm:create-fuwari@latest -``` - -1. `src/config.ts` ファイルを編集する事でブログを自分好みにカスタマイズ出来ます。 -2. `pnpm new-post ` で新しい記事を作成し、`src/content/posts/`.フォルダ内で編集します。 -3. 作成したブログをVercel、Netlify、GitHub Pagesなどにデプロイするには[ガイド](https://docs.astro.build/ja/guides/deploy/)に従って下さい。加えて、別途デプロイを行う前に `astro.config.mjs` を編集してサイト構成を変更する必要があります。 - -## 🚀 使用方法 2 - -1. [テンプレート](https://github.com/saicaca/fuwari/generate)から新しいリポジトリを作成するかCloneをします。 -2. ブログをローカルで編集するには、リポジトリをクローンした後、`pnpm install` と `pnpm add sharp` を実行して依存関係をインストールします。 - - [pnpm](https://pnpm.io) がインストールされていない場合は `npm install -g pnpm` で導入可能です。 -3. `src/config.ts` ファイルを編集する事でブログを自分好みにカスタマイズ出来ます。 -4. `pnpm new-post ` で新しい記事を作成し、`src/content/posts/`.フォルダ内で編集します。 -5. 作成したブログをVercel、Netlify、GitHub Pagesなどにデプロイするには[ガイド](https://docs.astro.build/ja/guides/deploy/)に従って下さい。加えて、別途デプロイを行う前に `astro.config.mjs` を編集してサイト構成を変更する必要があります。 - -## ⚙️ 記事のフロントマター - -```yaml ---- -title: My First Blog Post -published: 2023-09-09 -description: This is the first post of my new Astro blog. -image: /images/cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false ---- -``` - -## 🧞 コマンド - -すべてのコマンドは、ターミナルでプロジェクトのルートから実行する必要があります: - -| Command | Action | -|:------------------------------------|:--------------------------------------------| -| `pnpm install` AND `pnpm add sharp` | 依存関係のインストール | -| `pnpm dev` | `localhost:4321` で開発用ローカルサーバーを起動 | -| `pnpm build` | `./dist/` にビルド内容を出力 | -| `pnpm preview` | デプロイ前の内容をローカルでプレビュー | -| `pnpm new-post ` | 新しい投稿を作成 | -| `pnpm astro ...` | `astro add`, `astro check` の様なコマンドを実行する際に使用 | -| `pnpm astro --help` | Astro CLIのヘルプを表示 | diff --git a/docs/README.ko.md b/docs/README.ko.md deleted file mode 100644 index f561140..0000000 --- a/docs/README.ko.md +++ /dev/null @@ -1,82 +0,0 @@ -# 🍥Fuwari - -[Astro](https://astro.build)로 구축된 정적 블로그 템플릿입니다. - -[**🖥️미리보기 (Vercel)**](https://fuwari.vercel.app) - -![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ 특징 - -- [x] [Astro](https://astro.build) 및 [Tailwind CSS](https://tailwindcss.com)로 구축됨 -- [x] 부드러운 애니메이션 및 페이지 전환 -- [x] 라이트 모드 / 다크 모드 -- [x] 사용자 정의 가능한 테마 색상 및 배너 -- [x] 반응형 디자인 -- [x] [Pagefind](https://pagefind.app/)를 이용한 검색 기능 -- [x] [Markdown 확장 기능](https://github.com/saicaca/fuwari?tab=readme-ov-file#-markdown-extended-syntax) -- [x] 목차 -- [x] RSS 피드 - -## 🚀 시작하기 -1. 블로그 저장소를 생성하세요: - - 이 템플릿에서 [새 저장소를 생성](https://github.com/saicaca/fuwari/generate)하거나 이 저장소를 포크하세요. - - 또는 다음 명령어 중 하나를 실행하세요: - ```sh - npm create fuwari@latest - yarn create fuwari - pnpm create fuwari@latest - bun create fuwari@latest - deno run -A npm:create-fuwari@latest - ``` -2. 로컬에서 블로그를 수정하려면, 저장소를 복제하고 `pnpm install`을 실행하여 종속성을 설치하세요. - - [pnpm](https://pnpm.io)이 설치되어 있지 않다면 `npm install -g pnpm`을 실행하여 설치하세요. -3. `src/config.ts`설정 파일을 수정하여 블로그를 커스터마이징하세요. -4. `pnpm new-post `을 실행하여 새 게시물을 만들고 `src/content/posts/`에서 수정하세요. -5. [가이드](https://docs.astro.build/en/guides/deploy/)에 따라 블로그를 Vercel, Netlify, Github Pages 등에 배포하세요. 배포하기 전에 `astro.config.mjs`에서 사이트 구성을 수정해야 합니다. - -## ⚙️ 게시물의 머리말 설정 - -```yaml ---- -title: 내 첫 블로그 게시물 -published: 2023-09-09 -description: 내 새로운 Astro 블로그의 첫 번째 게시물입니다! -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false -lang: jp # 게시물의 언어가 `config.ts`의 사이트 언어와 다른 경우에만 설정합니다. ---- -``` -## 🧩 마크다운 확장 구문 -Astro의 기본 [GitHub Flavored Markdown](https://github.github.com/gfm/) 지원 외에도 몇 가지 추가적인 마크다운 기능이 포함되어 있습니다. -- Admonitions ([미리보기 및 사용법](https://fuwari.vercel.app/posts/markdown-extended/#admonitions)) -- GitHub 저장소 카드 ([미리보기 및 사용법](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards)) -- Expressive Code를 사용한 향상된 코드 블록 ([미리보기](https://fuwari.vercel.app/posts/expressive-code/) / [문서](https://expressive-code.com/)) - - - -## ⚡ 명령어 - -모든 명령어는 프로젝트 최상단, 터미널에서 실행됩니다: - -| Command | Action | -|:------------------------------------|:-------------------------------------------------| -| `pnpm install` | 종속성을 설치합니다. | -| `pnpm dev` | `localhost:4321`에서 로컬 개발 서버를 시작합니다. | -| `pnpm build` | `./dist/`에 프로덕션 사이트를 구축합니다. | -| `pnpm check` | 코드에서 오류를 확인합니다. | -| `pnpm format` | Biome을 사용하여 코드를 포멧합니다. | -| `pnpm preview` | 배포하기 전에 로컬에서 빌드 미리보기 | -| `pnpm new-post ` | 새 게시물 작성 | -| `pnpm astro ...` | `astro add`, `astro check`와 같은 CLI 명령어 실행 | -| `pnpm astro --help` | Astro CLI를 사용하여 도움 받기 | - -## ✏️ 기여 -이 프로젝트에 기여하는 방법에 대한 자세한 내용은 [기여 가이드](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md)를 확인하세요. - -## 📄 라이선스 -이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. - -[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari.svg?type=large&issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaicaca%2Ffuwari?ref=badge_large&issueType=license) \ No newline at end of file diff --git a/docs/README.th.md b/docs/README.th.md deleted file mode 100644 index e8a215c..0000000 --- a/docs/README.th.md +++ /dev/null @@ -1,84 +0,0 @@ -# 🍥Fuwari - -แม่แบบสำหรับเว็บบล็อกแบบ static สร้างด้วย [Astro](https://astro.build) - -[**🖥️ ตัวอย่างการใช้งานจริง (Vercel)**](https://fuwari.vercel.app) - -![ภาพตัวอย่าง](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ คุณสมบัติ - -- [x] สร้างด้วย [Astro](https://astro.build) และ [Tailwind CSS](https://tailwindcss.com) -- [x] มีอนิเมชั่นและการเปลี่ยนหน้าอย่างลื่นไหล -- [x] โหมดสว่าง / โหมดมืด -- [x] ปรับแต่งสีธีมและแบนเนอร์ได้ -- [x] Responsive design (หน้าตาเว็บปรับเปลี่ยนตามขนาดจอ) -- [x] ฟังก์ชันการค้นหา ขับเคลื่อนด้วย [Pagefind](https://pagefind.app/) -- [x] [คุณสมบัติเพิ่มเติมสำหรับมาร์กดาวน์](https://github.com/saicaca/fuwari/blob/main/docs/README.th.md#-markdown-extended-syntax) -- [x] สารบัญ -- [x] RSS feed - -## 🚀 เริ่มต้นใช้งาน - -1. สร้าง repository ใหม่สำหรับบล็อกของคุณ: - - [Generate repository ใหม่](https://github.com/saicaca/fuwari/generate) ขึ้นมาจากแม่แบบนี้ หรือจะ fork repository นี้ก็ได้ - - หรือจะสร้างโดยการเลือกรันคำสั่งต่อไปนี้ คำสั่งใดคำสั่งหนึ่ง: - ```sh - npm create fuwari@latest - yarn create fuwari - pnpm create fuwari@latest - bun create fuwari@latest - deno run -A npm:create-fuwari@latest - ``` -2. เริ่มแก้ไขบล็อกของคุณแบบ local โดยการ clone repository ของคุณ (จากข้อ 1) ไว้ในเครื่องของคุณ แล้วรันคำสั่ง `pnpm install` เพื่อติดตั้ง dependencies ที่จำเป็น - - ติดตั้ง [pnpm](https://pnpm.io) ด้วยคำสั่ง `npm install -g pnpm` ก่อน ถ้ายังไม่เคยติดตั้ง -3. แก้ไขไฟล์การตั้งค่า `src/config.ts` เพื่อปรับแต่งบล็อกของคุณ -4. รันคำสั่ง `pnpm new-post ` เพื่อสร้างโพสต์ใหม่ใน `src/content/posts/` และแก้ไขไฟล์โพสต์นั้นๆ ให้สมบูรณ์ -5. Deploy เว็บบล็อกของคุณไปยัง Vercel, Netlify, GitHub Pages หรือบริการอื่นๆ โดยอ้างอิงวิธีการจาก[คู่มือนี้](https://docs.astro.build/en/guides/deploy/) อย่าลืมแก้ไขการตั้งค่าเว็บไซต์ในไฟล์ `astro.config.mjs` ก่อนที่คุณจะ deploy เว็บ - -## 📝 Frontmatter (ส่วนหัวไฟล์) ของโพสต์ - -```yaml ---- -title: โพสต์แรกของฉัน -published: 2023-09-09 -description: นี่คือโพสต์แรกของเว็บบล็อก Astro อันใหม่ของฉัน -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false -lang: jp # เขียนค่านี้เมื่อภาษาของโพสต์นั้นๆ แตกต่างจากภาษาของเว็บไซต์ที่ตั้งค่าไว้ใน `config.ts` เท่านั้น ---- -``` - -## 🧩 Markdown Extended Syntax - -เดิมที Astro มีการสนับสนุน[ภาษามาร์กดาวน์แบบของ GitHub](https://github.github.com/gfm/) ไว้อยู่แล้ว แต่ Fuwari ได้เพิ่มเติมคุณสมบัติพิเศษอื่นๆ เข้าไปอีก: - -- Admonitions หรือ กล่องข้อมูลพิเศษ ([ดูตัวอย่างและการใช้งาน](https://fuwari.vercel.app/posts/markdown-extended/#admonitions)) -- การ์ด GitHub Repository ([ดูตัวอย่างและการใช้งาน](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards)) -- บล็อกโค้ดขั้นสูง ด้วย Expressive Code ([ดูตัวอย่าง](https://fuwari.vercel.app/posts/expressive-code/) / [เอกสารประกอบ](https://expressive-code.com/)) - -## ⚡ คำสั่ง - -คำสั่งที่รันได้ใน terminal จาก root ของโปรเจกต์: - -| คำสั่ง | การทำงาน | -|:---------------------------|:-------------------------------------------------------| -| `pnpm install` | ติดตั้ง dependencies | -| `pnpm dev` | เปิดเซิร์ฟเวอร์สำหรับการพัฒนาแบบ local ที่ `localhost:4321` | -| `pnpm build` | Build เว็บไซต์สำหรับใช้งานจริงไปยังโฟลเดอร์ `./dist/` | -| `pnpm preview` | ดูตัวอย่าง build ของคุณแบบ local ก่อนที่จะ deploy จริง | -| `pnpm check` | ดำเนินการตรวจสอบหาข้อผิดพลาดในโค้ดของคุณ | -| `pnpm format` | จัดรูปแบบโค้ดของคุณด้วย Biome | -| `pnpm new-post ` | สร้างโพสต์ใหม่ | -| `pnpm astro ...` | รันคำสั่ง CLI เช่น `astro add`, `astro check` | -| `pnpm astro --help` | แสดงวิธีใช้งาน Astro CLI | - -## ✏️ การมีส่วนร่วม - -กรุณาอ่าน [แนวทางการมีส่วนร่วม](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md) สำหรับรายละเอียดวิธีการมีส่วนร่วมในโปรเจกต์นี้ - -## 📄 สัญญาอนุญาต - -โปรเจกต์นี้เผยแพร่ภายใต้สัญญาอนุญาตแบบ MIT License diff --git a/docs/README.vi.md b/docs/README.vi.md deleted file mode 100644 index 90dd2e6..0000000 --- a/docs/README.vi.md +++ /dev/null @@ -1,84 +0,0 @@ -# 🍥Fuwari - -Một mẫu blog tĩnh được xây bằng [Astro](https://astro.build). - -[**🖥️ Xem bản dùng thử (Vercel)**](https://fuwari.vercel.app) - -![Hình ảnh xem trước](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ Tính năng - -- [x] Được xây dựng bằng [Astro](https://astro.build) và [Tailwind CSS](https://tailwindcss.com) -- [x] Có hoạt ảnh đổi chuyển trang mượt mà -- [x] Chế độ sáng / tối -- [x] Màu sắc và biểu ngữ có thể tùy chỉnh được -- [x] Thiết kế nhanh nhạy -- [x] Có chức năng tìm kiếm với [Pagefind](https://pagefind.app/) -- [x] [Có các tính năng mở rộng của Markdown](https://github.com/saicaca/fuwari?tab=readme-ov-file#-markdown-extended-syntax) -- [x] Có mục lục -- [x] Nguồn cấp dữ liệu RSS - -## 🚀 Bắt đầu - -1. Tạo kho lưu trữ blog của bạn: - - [Tạo một kho lưu trữ mới](https://github.com/saicaca/fuwari/generate) từ mẫu này hoặc fork kho lưu trữ này. - - Hoặc chạy một trong các lệnh sau: - ```sh - npm create fuwari@latest - yarn create fuwari - pnpm create fuwari@latest - bun create fuwari@latest - deno run -A npm:create-fuwari@latest - ``` -2. Để chỉnh sửa blog của bạn trên máy cục bộ, hãy clone kho lưu trữ của bạn, chạy lệnh `pnpm install` để cài đặt các phụ thuộc.. - - Cài đặt [pnpm](https://pnpm.io) `npm install -g pnpm` nếu chưa có. -3. Chỉnh sửa tệp cấu hình `src/config.ts` để tùy chỉnh blog của bạn. -4. Chạy `pnpm new-post ` để tạo một bài viết mới và chỉnh sửa nó trong `src/content/posts/`. -5. Triển khai blog của bạn lên Vercel, Netlify, GitHub Pages, etc. theo [chỉ dẫn](https://docs.astro.build/en/guides/deploy/). Bạn cần chỉnh sửa cấu hình trang web trong `astro.config.mjs` trước khi triển khai. - -## 📝 Tiêu đề đầy đủ của bài viết - -```yaml ---- -title: Blog đầu tiên của mình -published: 2023-09-09 -description: Đây là bài viết đầu tiên vủa mình trên trang blog tạo bằng Astro này. -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false -lang: jp # Chỉ đặt nếu ngôn ngữ của bài viết khác với ngôn ngữ của trang web trong `config.ts` ---- -``` - -## 🧩 Cú pháp Markdown mở rộng - -Ngoài việc Astro đã có hỗ trợ mặc định cho [Markdown vị Github](https://github.github.com/gfm/), một số tính năng Markdown khác cũng đã được bổ sung: - -- Chêm xen ([Xem trước và Cách sử dụng](https://fuwari.vercel.app/posts/markdown-extended/#admonitions)) -- Thẻ hiển thị kho lưu trữ GitHub ([Xem trước và Cách sử dụng](https://fuwari.vercel.app/posts/markdown-extended/#github-repository-cards)) -- Các khối mã nâng cao với Expressive Code ([Xem trước](https://fuwari.vercel.app/posts/expressive-code/) / [Tài liệu](https://expressive-code.com/)) - -## ⚡ Lệnh - -Tất cả các lệnh được chạy từ thư mục gốc của dự án, từ một bảng điều khiển: - -| Lệnh | Mục đích | -|:---------------------------|:----------------------------------------------------| -| `pnpm install` | Cài đặt các phụ thuộc | -| `pnpm dev` | Khởi động máy chủ cục bộ tại `localhost:4321` | -| `pnpm build` | Xây dựng trang web của bạn vào `./dist/` | -| `pnpm preview` | Xem trước bản web cục bộ của bạn, trước khi triển khai | -| `pnpm check` | Chạy kiểm tra lỗi trong mã của bạn | -| `pnpm format` | Định dạng mã của bạn bằng Biome | -| `pnpm new-post ` | Tạo một bài viết mới | -| `pnpm astro ...` | Chạy các lệnh CLI như `astro add`, `astro check` | -| `pnpm astro --help` | Nhận trợ giúp sử dụng Astro CLI | - -## ✏️ Đóng góp - -Xem [Hướng dẫn đóng góp](https://github.com/saicaca/fuwari/blob/main/CONTRIBUTING.md) để biết thêm chi tiết về cách đóng góp cho dự án này. - -## 📄 Giấy phép - -Dự án này đã được cấp Giấy phép MIT. diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.md deleted file mode 100644 index 68fdd2b..0000000 --- a/docs/README.zh-CN.md +++ /dev/null @@ -1,86 +0,0 @@ -# 🍥Fuwari - -基于 [Astro](https://astro.build) 开发的静态博客模板。 - -[**🖥️在线预览(Vercel)**](https://fuwari.vercel.app) - -![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png) - -## ✨ 功能特性 - -- [x] 基于 Astro 和 Tailwind CSS 开发 -- [x] 流畅的动画和页面过渡 -- [x] 亮色 / 暗色模式 -- [x] 自定义主题色和横幅图片 -- [x] 响应式设计 -- [ ] 评论 -- [x] 搜索 -- [x] 文内目录 - -## 👀 要求 - -- Node.js <= 22 -- pnpm <= 9 - -## 🚀 使用方法 1 - -使用 [create-fuwari](https://github.com/L4Ph/create-fuwari) 在本地初始化项目。 - -```sh -# npm -npm create fuwari@latest - -# yarn -yarn create fuwari - -# pnpm -pnpm create fuwari@latest - -# bun -bun create fuwari@latest - -# deno -deno run -A npm:create-fuwari@latest -``` - -1. 通过配置文件 `src/config.ts` 自定义博客 -2. 执行 `pnpm new-post ` 创建新文章,并在 `src/content/posts/` 目录中编辑 -3. 参考[官方指南](https://docs.astro.build/zh-cn/guides/deploy/)将博客部署至 Vercel, Netlify, GitHub Pages 等;部署前需编辑 `astro.config.mjs` 中的站点设置。 - -## 🚀 使用方法 2 - -1. 使用此模板[生成新仓库](https://github.com/saicaca/fuwari/generate)或 Fork 此仓库 -2. 进行本地开发,Clone 新的仓库,执行 `pnpm install` 和 `pnpm add sharp` 以安装依赖 - - 若未安装 [pnpm](https://pnpm.io),执行 `npm install -g pnpm` -3. 通过配置文件 `src/config.ts` 自定义博客 -4. 执行 `pnpm new-post ` 创建新文章,并在 `src/content/posts/` 目录中编辑 -5. 参考[官方指南](https://docs.astro.build/zh-cn/guides/deploy/)将博客部署至 Vercel, Netlify, GitHub Pages 等;部署前需编辑 `astro.config.mjs` 中的站点设置。 - -## ⚙️ 文章 Frontmatter - -```yaml ---- -title: My First Blog Post -published: 2023-09-09 -description: This is the first post of my new Astro blog. -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false -lang: jp # 仅当文章语言与 `config.ts` 中的网站语言不同时需要设置 ---- -``` - -## 🧞 指令 - -下列指令均需要在项目根目录执行: - -| Command | Action | -|:----------------------------------|:----------------------------------| -| `pnpm install` 并 `pnpm add sharp` | 安装依赖 | -| `pnpm dev` | 在 `localhost:4321` 启动本地开发服务器 | -| `pnpm build` | 构建网站至 `./dist/` | -| `pnpm preview` | 本地预览已构建的网站 | -| `pnpm new-post ` | 创建新文章 | -| `pnpm astro ...` | 执行 `astro add`, `astro check` 等指令 | -| `pnpm astro --help` | 显示 Astro CLI 帮助 | diff --git a/public/assets/avatar.jpg b/public/assets/avatar.jpg new file mode 100644 index 0000000..b284533 Binary files /dev/null and b/public/assets/avatar.jpg differ diff --git a/src/assets/images/demo-avatar.png b/src/assets/images/demo-avatar.png deleted file mode 100644 index 84320d4..0000000 Binary files a/src/assets/images/demo-avatar.png and /dev/null differ diff --git a/src/assets/images/demo-banner.png b/src/assets/images/demo-banner.png deleted file mode 100644 index f8c0310..0000000 Binary files a/src/assets/images/demo-banner.png and /dev/null differ diff --git a/src/components/Footer.astro b/src/components/Footer.astro index fe39b38..5f4aba7 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -11,11 +11,15 @@ const currentYear = new Date().getFullYear();
- © {currentYear} {profileConfig.name}. All Rights Reserved. / + 萌ICP备20256087号 +
+ © {currentYear} {profileConfig.name}. All Rights Reserved. +
RSS / Sitemap
- Powered by - Astro & + 由 + AstroFuwari + 强力驱动
\ No newline at end of file diff --git a/src/components/LightDarkSwitch.svelte b/src/components/LightDarkSwitch.svelte index c200bd6..70595d7 100644 --- a/src/components/LightDarkSwitch.svelte +++ b/src/components/LightDarkSwitch.svelte @@ -11,8 +11,8 @@ import { import { onMount } from "svelte"; import type { LIGHT_DARK_MODE } from "@/types/config.ts"; -const seq: LIGHT_DARK_MODE[] = [LIGHT_MODE, DARK_MODE, AUTO_MODE]; -let mode: LIGHT_DARK_MODE = $state(AUTO_MODE); +const seq: LIGHT_DARK_MODE[] = [LIGHT_MODE, DARK_MODE]; +let mode: LIGHT_DARK_MODE = LIGHT_MODE; onMount(() => { mode = getStoredTheme(); @@ -66,9 +66,6 @@ function hidePanel() {
-
- -
diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index a7a7143..51e7982 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -7,6 +7,7 @@ import { i18n } from "../i18n/translation"; import { getDir } from "../utils/url-utils"; import ImageWrapper from "./misc/ImageWrapper.astro"; import PostMetadata from "./PostMeta.astro"; +import { umamiConfig } from "../config"; interface Props { class?: string; @@ -64,14 +65,15 @@ const { remarkPluginFrontmatter } = await entry.render(); { description || remarkPluginFrontmatter.excerpt } - + +
-
- {remarkPluginFrontmatter.words} {" " + i18n(remarkPluginFrontmatter.words === 1 ? I18nKey.wordCount : I18nKey.wordsCount)} -
+
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
+
|
+
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
|
- {remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)} + 加载中...
@@ -106,5 +108,72 @@ const { remarkPluginFrontmatter } = await entry.render();
+ + + + + + + diff --git a/src/components/PostMeta.astro b/src/components/PostMeta.astro index 488e85e..1f87be6 100644 --- a/src/components/PostMeta.astro +++ b/src/components/PostMeta.astro @@ -1,9 +1,11 @@ --- +import path from "node:path"; import { Icon } from "astro-icon/components"; import I18nKey from "../i18n/i18nKey"; import { i18n } from "../i18n/translation"; import { formatDateToYYYYMMDD } from "../utils/date-utils"; -import { getCategoryUrl, getTagUrl } from "../utils/url-utils"; +import { getCategoryUrl, getTagUrl, getDir, url } from "../utils/url-utils"; +import { umamiConfig } from "../config"; interface Props { class: string; @@ -13,6 +15,7 @@ interface Props { category: string | null; hideTagsForMobile?: boolean; hideUpdateDate?: boolean; + slug?: string; } const { published, @@ -21,6 +24,7 @@ const { category, hideTagsForMobile = false, hideUpdateDate = false, + slug, } = Astro.props; const className = Astro.props.class; --- @@ -35,7 +39,7 @@ const className = Astro.props.class; {formatDateToYYYYMMDD(published)} - +
@@ -79,4 +84,72 @@ const className = Astro.props.class; {!(tags && tags.length > 0) &&
{i18n(I18nKey.noTags)}
}
- \ No newline at end of file + + {slug && ( +
+
+ +
+ 加载中... +
+ )} + + + + +{slug && ( + +)} \ No newline at end of file diff --git a/src/components/widget/Profile.astro b/src/components/widget/Profile.astro index 4c0897d..2a66393 100644 --- a/src/components/widget/Profile.astro +++ b/src/components/widget/Profile.astro @@ -1,6 +1,6 @@ --- import { Icon } from "astro-icon/components"; -import { profileConfig } from "../../config"; +import { profileConfig, umamiConfig } from "../../config"; import { url } from "../../utils/url-utils"; import ImageWrapper from "../misc/ImageWrapper.astro"; @@ -34,6 +34,65 @@ const config = profileConfig; {config.links[0].name} } + + +
+
+ + 加载中... +
+
+ + \ No newline at end of file diff --git a/src/config.ts b/src/config.ts index aec790a..c1ea819 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,15 +4,16 @@ import type { NavBarConfig, ProfileConfig, SiteConfig, + UmamiConfig, } from "./types/config"; import { LinkPreset } from "./types/config"; export const siteConfig: SiteConfig = { - title: "Fuwari", - subtitle: "Demo Site", - lang: "en", // Language code, e.g. 'en', 'zh-CN', 'ja', etc. + title: "Ad_closeNN 的小站", + subtitle: "Ad_closeNN 的小站,时不时会刷新一些野生的文档。", + lang: "zh_CN", // Language code, e.g. 'en', 'zh-CN', 'ja', etc. themeColor: { - hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 + hue: 360, // Invalid but fun( Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 fixed: false, // Hide the theme color picker for visitors }, banner: { @@ -20,16 +21,29 @@ export const siteConfig: SiteConfig = { src: "assets/images/demo-banner.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/' position: "center", // Equivalent to object-position, only supports 'top', 'center', 'bottom'. 'center' by default credit: { - enable: false, // Display the credit text of the banner image - text: "", // Credit text to be displayed + enable: true, // Display the credit text of the banner image + text: "a", // Credit text to be displayed url: "", // (Optional) URL link to the original artwork or artist's page }, }, + background: { + enable: true, // Enable background image + //src: "https://eo-pic.2x.nz/h", // Background image URL (supports HTTPS) + src: "https://bing.img.run/rand_1366x768.php", // Bing daily theme + position: "center", // Background position: 'top', 'center', 'bottom' + size: "cover", // Background size: 'cover', 'contain', 'auto' + repeat: "no-repeat", // Background repeat: 'no-repeat', 'repeat', 'repeat-x', 'repeat-y' + attachment: "fixed", // Background attachment: 'fixed', 'scroll', 'local' + opacity: 0.5, // Background opacity (0-1) + }, toc: { enable: true, // Display the table of contents on the right side of the post depth: 2, // Maximum heading depth to show in the table, from 1 to 3 }, favicon: [ + { + src: '/assets/avatar.jpg', + } // Leave this array empty to use the default favicon // { // src: '/favicon/icon.png', // Path of the favicon, relative to the /public directory @@ -45,18 +59,19 @@ export const navBarConfig: NavBarConfig = { LinkPreset.Archive, LinkPreset.About, { - name: "GitHub", - url: "https://github.com/saicaca/fuwari", // Internal links should not include the base path, as it is automatically added + name: "统计信息", + url: "https://umami.adclosenn.top/share/XMDJoIb1D21UxHdH", // Internal links should not include the base path, as it is automatically added external: true, // Show an external link icon and will open in a new tab }, ], }; export const profileConfig: ProfileConfig = { - avatar: "assets/images/demo-avatar.png", // Relative to the /src directory. Relative to the /public directory if it starts with '/' - name: "Lorem Ipsum", - bio: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + avatar: "/assets/avatar.jpg", // Relative to the /src directory. Relative to the /public directory if it starts with '/' + name: "Ad_closeNN", + bio: "永远相信美好的事情即将发生", links: [ + /* { name: "Twitter", icon: "fa6-brands:twitter", // Visit https://icones.js.org/ for icon codes @@ -64,15 +79,16 @@ export const profileConfig: ProfileConfig = { // `pnpm add @iconify-json/` url: "https://twitter.com", }, + */ { name: "Steam", icon: "fa6-brands:steam", - url: "https://store.steampowered.com", + url: "https://steamcommunity.com/id/Ad_closeNN", }, { name: "GitHub", icon: "fa6-brands:github", - url: "https://github.com/saicaca/fuwari", + url: "https://github.com/Ad-closeNN", }, ], }; @@ -88,3 +104,10 @@ export const expressiveCodeConfig: ExpressiveCodeConfig = { // Please select a dark theme, as this blog theme currently only supports dark background color theme: "github-dark", }; + +export const umamiConfig: UmamiConfig = { + enable: true, + baseUrl: "https://umami.adclosenn.top", + shareId: "XMDJoIb1D21UxHdH", + timezone: "Asia/Shanghai", +}; \ No newline at end of file diff --git a/src/content/assets/images/domain-19991230.xyz-chromeabuse-page.png b/src/content/assets/images/domain-19991230.xyz-chromeabuse-page.png new file mode 100644 index 0000000..de21cab Binary files /dev/null and b/src/content/assets/images/domain-19991230.xyz-chromeabuse-page.png differ diff --git a/src/content/assets/images/domain-19991230.xyz-googlesafe-unsafe.png b/src/content/assets/images/domain-19991230.xyz-googlesafe-unsafe.png new file mode 100644 index 0000000..8e27ced Binary files /dev/null and b/src/content/assets/images/domain-19991230.xyz-googlesafe-unsafe.png differ diff --git a/src/content/assets/images/domain-adclosenn.top-alipay.jpg b/src/content/assets/images/domain-adclosenn.top-alipay.jpg new file mode 100644 index 0000000..511aa00 Binary files /dev/null and b/src/content/assets/images/domain-adclosenn.top-alipay.jpg differ diff --git a/src/content/assets/images/domain-inlist-adclosenn.top.png b/src/content/assets/images/domain-inlist-adclosenn.top.png new file mode 100644 index 0000000..b77bb65 Binary files /dev/null and b/src/content/assets/images/domain-inlist-adclosenn.top.png differ diff --git a/src/content/assets/images/domain-serverHold-qqmail.png b/src/content/assets/images/domain-serverHold-qqmail.png new file mode 100644 index 0000000..defa6b8 Binary files /dev/null and b/src/content/assets/images/domain-serverHold-qqmail.png differ diff --git a/src/content/assets/images/neon-connect-to-your-database.png b/src/content/assets/images/neon-connect-to-your-database.png new file mode 100644 index 0000000..18098e6 Binary files /dev/null and b/src/content/assets/images/neon-connect-to-your-database.png differ diff --git a/src/content/assets/images/neon-create-project-menu.png b/src/content/assets/images/neon-create-project-menu.png new file mode 100644 index 0000000..89afa04 Binary files /dev/null and b/src/content/assets/images/neon-create-project-menu.png differ diff --git a/src/content/assets/images/neon-noproject-create-project.png b/src/content/assets/images/neon-noproject-create-project.png new file mode 100644 index 0000000..00ae55d Binary files /dev/null and b/src/content/assets/images/neon-noproject-create-project.png differ diff --git a/src/content/assets/images/neon-project-dashboard-selected-connect.png b/src/content/assets/images/neon-project-dashboard-selected-connect.png new file mode 100644 index 0000000..044653b Binary files /dev/null and b/src/content/assets/images/neon-project-dashboard-selected-connect.png differ diff --git a/src/content/assets/images/netlify-create-project-detail.png b/src/content/assets/images/netlify-create-project-detail.png new file mode 100644 index 0000000..ea79e31 Binary files /dev/null and b/src/content/assets/images/netlify-create-project-detail.png differ diff --git a/src/content/assets/images/netlify-deploy-menu-umami.png b/src/content/assets/images/netlify-deploy-menu-umami.png new file mode 100644 index 0000000..6ca4713 Binary files /dev/null and b/src/content/assets/images/netlify-deploy-menu-umami.png differ diff --git a/src/content/assets/images/spaceship-index.png b/src/content/assets/images/spaceship-index.png new file mode 100644 index 0000000..5f19737 Binary files /dev/null and b/src/content/assets/images/spaceship-index.png differ diff --git a/src/content/assets/images/umami-language-panel.png b/src/content/assets/images/umami-language-panel.png new file mode 100644 index 0000000..cfb2067 Binary files /dev/null and b/src/content/assets/images/umami-language-panel.png differ diff --git a/src/content/assets/images/umami-login-panel.png b/src/content/assets/images/umami-login-panel.png new file mode 100644 index 0000000..d0027d7 Binary files /dev/null and b/src/content/assets/images/umami-login-panel.png differ diff --git a/src/content/assets/images/umami-screenshot.png b/src/content/assets/images/umami-screenshot.png new file mode 100644 index 0000000..adef618 Binary files /dev/null and b/src/content/assets/images/umami-screenshot.png differ diff --git a/src/content/posts/expressive-code.md b/src/content/init_post/expressive-code.md similarity index 100% rename from src/content/posts/expressive-code.md rename to src/content/init_post/expressive-code.md diff --git a/src/content/posts/markdown-extended.md b/src/content/init_post/markdown-extended.md similarity index 100% rename from src/content/posts/markdown-extended.md rename to src/content/init_post/markdown-extended.md diff --git a/src/content/posts/markdown.md b/src/content/init_post/markdown.md similarity index 100% rename from src/content/posts/markdown.md rename to src/content/init_post/markdown.md diff --git a/src/content/posts/video.md b/src/content/init_post/video.md similarity index 100% rename from src/content/posts/video.md rename to src/content/init_post/video.md diff --git a/src/content/posts/draft.md b/src/content/posts/draft.md deleted file mode 100644 index 77aba5a..0000000 --- a/src/content/posts/draft.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -title: Draft Example -published: 2022-07-01 -tags: [Markdown, Blogging, Demo] -category: Examples -draft: true ---- - -# This Article is a Draft - -This article is currently in a draft state and is not published. Therefore, it will not be visible to the general audience. The content is still a work in progress and may require further editing and review. - -When the article is ready for publication, you can update the "draft" field to "false" in the Frontmatter: - -```markdown ---- -title: Draft Example -published: 2024-01-11T04:40:26.381Z -tags: [Markdown, Blogging, Demo] -category: Examples -draft: false ---- diff --git a/src/content/posts/guide/cover.jpeg b/src/content/posts/guide/cover.jpeg deleted file mode 100644 index 66104c3..0000000 Binary files a/src/content/posts/guide/cover.jpeg and /dev/null differ diff --git a/src/content/posts/guide/index.md b/src/content/posts/guide/index.md deleted file mode 100644 index 8db1e3d..0000000 --- a/src/content/posts/guide/index.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Simple Guides for Fuwari -published: 2024-04-01 -description: "How to use this blog template." -image: "./cover.jpeg" -tags: ["Fuwari", "Blogging", "Customization"] -category: Guides -draft: false ---- - -> Cover image source: [Source](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg) - -This blog template is built with [Astro](https://astro.build/). For the things that are not mentioned in this guide, you may find the answers in the [Astro Docs](https://docs.astro.build/). - -## Front-matter of Posts - -```yaml ---- -title: My First Blog Post -published: 2023-09-09 -description: This is the first post of my new Astro blog. -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false ---- -``` - -| Attribute | Description | -|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `title` | The title of the post. | -| `published` | The date the post was published. | -| `description` | A short description of the post. Displayed on index page. | -| `image` | The cover image path of the post.
1. Start with `http://` or `https://`: Use web image
2. Start with `/`: For image in `public` dir
3. With none of the prefixes: Relative to the markdown file | -| `tags` | The tags of the post. | -| `category` | The category of the post. | -| `draft` | If this post is still a draft, which won't be displayed. | - -## Where to Place the Post Files - - - -Your post files should be placed in `src/content/posts/` directory. You can also create sub-directories to better organize your posts and assets. - -``` -src/content/posts/ -├── post-1.md -└── post-2/ - ├── cover.png - └── index.md -``` diff --git a/src/content/posts/new-domain.md b/src/content/posts/new-domain.md new file mode 100644 index 0000000..7ed6bc6 --- /dev/null +++ b/src/content/posts/new-domain.md @@ -0,0 +1,166 @@ +--- +title: 新域名! +published: 2099-12-31 +tags: ["域名"] +description: 获得了一个新域名 *这使我充满了决心 +image: ../assets/images/domain-inlist-adclosenn.top.png +category: 记录 +draft: false +--- + +# .xyz 域名 +:::note +下面讲的都是[阿里云(国内站)](https://wanwang.aliyun.com/domain)。 +::: +之前在[*里云](https://wanwang.aliyun.com/domain)买了个8位纯数字的 `.xyz` 域名,现在买了 `.top` 后觉得特亏。一是在阿里云里面买任何域名都需要实名认证(14+),还得填一些实际身份的信息,我了个去,填完这些信息都够我在 Spaceship 买两次域名了,真是够麻烦的。。。 + +# .top 域名 +买域名后直接开始搭博客,真香~如果不出意外的话,这个域名将会一直用下去。~~毕竟`.top`确实便宜~~ + +付款的时候甚至不用绑国外卡,能直接用支付宝付款,更不用**实名认证**。另外,Spaceship 的 Web UI 做的是真漂亮、简洁。不过毕竟 Spaceship 是一家 **“ICANN认证的注册商,自2022年以来为客户服务”** 的初创公司,没有隔壁像 [Namesilo(2009)](https://www.namesilo.com)、[Namecheap(2001)](https://www.namecheap.com) 等那么老牌,这么现代的 UI 也挺对。 + + +## 信息 +- 来源:[Spaceship](https://www.spaceship.com) (这是真能省钱) +- 域名:[adclosenn.top](/) +- 首年花费:7.33 人民币(汇率:1.00 USD = 7.23002 CNY) ![domain-adclosenn.top-alipay.jpg](../assets/images/domain-adclosenn.top-alipay.jpg) +- 次年花费:29.07 人民币 (¥27.63 域名费+¥1.44 ICANN 费) +- [Whois(阿里云国际站)](https://www.alibabacloud.com/zh/whois): +``` +Domain Name: adclosenn.top +Registry Domain ID: D20250806G10001G_53477846-top +Registrar WHOIS Server: whois.spaceship.com +Registrar URL: http://www.spaceship.com +Updated Date: 2025-08-06T05:28:21Z +Creation Date: 2025-08-06T04:49:06Z +Registrar Registration Expiration Date: 2026-08-06T04:49:06Z +Registrar: Spaceship, Inc. +Registrar IANA ID: 3862 +Reseller: +Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited +Domain Status: addPeriod https://icann.org/epp#addPeriod +Registrant State/Province: Capital Region +Registrant Country: IS +Name Server: malavika.ns.cloudflare.com +Name Server: rustam.ns.cloudflare.com +DNSSEC: unsigned +Registrar Abuse Contact Email: abuse@spaceship.com +Registrar Abuse Contact Phone: +1.16027723958 +URL of the ICANN WHOIS Data Problem Reporting System: http://wdprs.internic.net/ +``` + +## 优惠码 +这次购买使用的是 `SPSR86`,省了**1.66 人民币**(原价¥8.99)。代码来自 [tld-list.com](https://zh-hans.tld-list.com/%E4%BC%98%E6%83%A0%E7%A0%81)。 + +--- + +# 新域名的由来 +~~便宜!~~ + +## 2025/8/2 - 引导 +2号晚上,跟着[二叉树树](https://space.bilibili.com/325903362)博客搞起了[TG反代](https://2x.nz/posts/proxy-tgweb/)。脑餐的是,我并没有把登录页面放在子路径下,而是直接暴露在公网上了。之前并不知道子域名可以被扫出来,所以也没做好防护。因为搭建好后并没什么问题,所以直接去睡觉了。 + +## 2025/8/3 - 预告 +早上起来一看发现仍然没问题,TG反代也能正常访问。 + +起床打开电脑,输入 TGWeb 反代地址,Chrome 直接开出了个大红。嗯,确实是大红。 ![domain-19991230.xyz-chromeabuse-page](../assets/images/domain-19991230.xyz-chromeabuse-page.png) + +不过仍然没收到来自任何关于**钓鱼**、**滥用**的邮件。 + +飞到 [Google Safe Browsing 透明度报告](https://transparencyreport.google.com/safe-browsing/search) ,一看检查,发现已经被列入了危险列表。 ![domain-19991230.xyz-googlesafe-unsafe](../assets/images/domain-19991230.xyz-googlesafe-unsafe.png) + +不过因为是自用的,也就无视风险接着用了。 + +## 2025/8/4 - 开始 +2025年8月4日早上醒来,发现 [UptimeRobot](https://uptimerobot.com) 给我发了很多封邮件,全都是 DOWN 的(突然 UP 的是因为 DNS 等缓存问题,后续全都是 DOWN) ![domain-serverHold-qqmail](../assets/images/domain-serverHold-qqmail.png) + +我立马就意识到不对劲了。用 [itdog](https://www.itdog.cn) 查 NS 记录,发现全都**无解析记录**。后来 Whois 发现域名居然被 XYZ 注册局 **serverHold** 了([注册局暂停解析](https://www.icann.org/resources/pages/epp-status-codes-2014-06-16-en/#serverHold))。 + +马上找到了阿里云开了个工单。阿里云工程师告诉我要自己去 XYZ 注册局的 [gen.xyz/unsuspend](https://gen.xyz/unsuspend) 解决。 + +由于解决 suspend 需要提供证据: + +- “ **Please note that domains will only be reviewed and reactivated when requests are filled out completely and domains have been delisted from all blocklists.** ” + +- “ **请注意,仅当请求完整填写并且域名已从所有阻止列表中删除后,才会审核并重新激活域名。** ” + +所以我在 `2025/8/7 16:29` 的时候提交部分证据和申请信息到了 [xyzabuse@gen.xyz](mailto:xyzabuse@gen.xyz) 。 + +## 2025/8/5 - 申诉 +早上一起来,UptimeRobot 仍未发送 UP 通知。再看昨天发给 gen.xyz 的邮件,也没有回复我。索性去 [gen.xyz/unsuspend](https://gen.xyz/unsuspend) 解决。 + +解决前,我把几个安全机构的 Support 都发了一遍邮件,让他们重新检查。回头再看 Google Safe Browsing 透明度报告,`19991230.xyz`及其他除`web.`外的域,都已经变为绿色正常。 + +16:00 点后,来到 gen.xyz,填了填报告,submit了。而这居然还有坑? + +:::warning +当时的情况如此,并非等于现在情况。 +::: + +1. 网站看起来是不用登录就能 Submit 的,因为下面让你填 **名字** 和 **邮箱**,实际上没登录时,等你 Submit 后会说你未填写用户名和邮箱地址。注册好 XYZ 账号后,再次 Submit 即可成功提交。(吗? +2. 登录 XYZ 账号后 Submit,会返回 ``500 Internal Server Error``,**但实际上貌似已成功发送了你的请求**,真是奇怪。 + +## 2025/8/6 - 复活 +早上再次查看,发现 UptimeRobot 已经发了很多封 UP 邮件。**好耶,域名复活了!** + +``` +Tuesday, August 5, 2025 - 20:08 PM + +XYZ Anti-Abuse Agent 656322, Staff + +Subject: Request for Removal of serverHold Status for Domain 19991230.xyz +Subject / Abuse Type: + +Hello Ad_closeNN, + +Thank you for your message. This domain has been unsuspended and is now active. This domain was flagged by Spamhaus and has since dropped off due to the site being inactive. Please check Spamhaus DBL after 24 hrs to ensure delisting. + +Please note that it will be added to a watch list for any potential violations of our anti-abuse policies, and we will continue to monitor this domain. + +Also note, it can take up to 24 hours for the WHOIS information to update. + +Please submit a new support ticket at https://gen.xyz/abuse if you have any further evidence or information. + +Kind Regards, +XYZ Anti-Abuse Team +xyz_abuse@gen.xyz +M-F 9am-5pm PT +``` + +译文(Google 翻译 ~~生草机~~) +``` +2025年8月5日,星期二,晚上8:08 + +XYZ 反滥用代理 656322,工作人员 + +主题:请求移除域名 19991230.xyz 的服务器暂停状态 +主题/滥用类型: + +您好,Ad_closeNN, + +感谢您的留言。此域名已解除暂停状态,现已恢复正常。此域名曾被 Spamhaus 标记,由于网站处于非活跃状态,现已下架。请在 24 小时后查看 Spamhaus 的 DBL,以确保将其下架。 + +请注意,我们将把该域名添加到监视列表中,以查找任何可能违反我们反滥用政策的行为,并持续监控该域名。 + +另请注意,WHOIS 信息更新可能需要最多 24 小时。 + +如果您有任何进一步的证据或信息,请访问 https://gen.xyz/abuse 提交新的支持工单。 + +此致, + +XYZ 反滥用团队 +xyz_abuse@gen.xyz +周一至周五 上午 9 点至下午 5 点(太平洋时间) +``` + +然后到了中午,看着旧 `.xyz` 域名,因为这个域名被标记过,之后可能也会被持续严格视奸,所以想到了买一个新的域名。于是到 Namesilo、NameCheap、Spaceship 看,发现英文域名+ `.top` 比较便宜。Google 一搜优惠代码,真找到了个能用的。于是就以 ¥7.33 拿下了 `adclosenn.top` 的首年~~~ + + +# 结语 +这件事经历了4天(**8/2**~**8/6**),让我体会到了从域名被 `serverHold` 到 `active` 的过程。 + +所以...... 搞反代千万不能把登录等敏感页面直接暴露在公网(推荐自用密码+/xxx) 😡😡😡 + +血一般的教训 😡😡😡 我都没想过会 `serverHold` 😡😡😡 我真的没想过钓鱼 😡😡😡 + +--- diff --git a/src/content/posts/umami.md b/src/content/posts/umami.md new file mode 100644 index 0000000..7659c00 --- /dev/null +++ b/src/content/posts/umami.md @@ -0,0 +1,60 @@ +--- +title: 手把手自托管 Umami +published: 2025-08-07 +tags: ["自行部署"] +description: Umami 是一个精美的网站统计分析工具,我们可以自托管它以解除官方限制 +image: ../assets/images/umami-screenshot.png +category: 教程 +draft: false +--- + +# 自行托管 Umami + +## 什么是 Umami +[Umami](https://umami.is) 是一个[开源的](https://github.com/umami-software/umami)的网站统计工具。与 [Google Analytics](https://developers.google.com/analytics) 类似,但比 Google Analytics 的网页 UI 更简洁、精美。 + +## 为什么要自托管 +[Umami](https://umami.is) 可搭配 [Umami Cloud](https://cloud.umami.is/signup) 托管 Umami App。但是这种方式相比自托管有诸多限制: +- 事件:100,000 次/月 +- 被分析的网站:3 个/账号 +- 数据保留:6 个月 +- 有限的 API 访问 +- ...更多可在 [umami/pricing](https://umami.is/pricing) 中查看 + +## 条件 +- 一个托管平台账号(任选其一)。本教程以 [Netlify](https://www.netlify.com) 为托管平台演示。 + - [Netlify](https://www.netlify.com) + - [Vercel](https://vercel.com) + - [Cloudflare](https://www.cloudflare.com) + - [Render](https://render.com) + - [Railway](https://railway.app) + - ...等 +- 一个 [GitHub](https://github.com) 账号。 +- 一个数据库。本教程以 [Neon](https://neon.com) 为数据库演示。 +:::warning +Neon 仍有使用限制:[https://neon.com/pricing](https://neon.com/pricing) +- 500 MB 存储空间 +::: + +## 自托管 +1. 来到 [Neon/signup](https://console.neon.tech/signup) 注册一个账号(注册过的直接去到 [console.neon.tech](https://console.neon.tech) )。 +2. 注册后来到 [console.neon.tech](https://console.neon.tech)。 +3. 点击 **Create Project** 按钮。 ![neon-noproject-create-project](../assets/images/neon-noproject-create-project.png) +4. 取一个项目名字,填到 **Project name**。**Cloud service provider** 和 **Region** 随便选一个即可。然后点击 **Create** 按钮创建项目。 ![neon-create-project-menu](../assets/images/neon-create-project-menu.png) +5. 在项目的 **Dashboard** 内点击右上角的 **Connect** 按钮,在 Connect 页面下方点击 **Show password**,将 `psql '` 后,末尾 `'` 前的内容复制下来。 ![neon-connect-to-your-database](../assets/images/neon-connect-to-your-database.png) +6. 访问 [@umami-software/umami](https://github.com/umami-software/umami/fork) ,将 umami 仓库 fork 到你的账户下。 +7. 访问 [Netlify/start](https://app.netlify.com/start),在 **Let’s deploy your project with…** 里选择 **GitHub** 并授权到你的 GitHub 账户。 +8. 选择刚刚 fork 的 umami 仓库 ![netlify-deploy-menu-umami](../assets/images/netlify-deploy-menu-umami.png) +9. **Project name** 随便填,**Build Command** 请填写 `yarn run build`(而不是系统给的 `pnpm run build-app`)。 +10. 往下找到 **Environment variables**,点击 **Add environment variables**,选择 **Add ket/value pairs**。`Key` 中填写 `DATABASE_URL`,`Value` 填写在 [Neon Console](https://console.neon.tech/) (步骤5)中复制的链接。填写完毕后点击 **Deploy umami** 按钮来部署。 ![netlify-create-project-detail](../assets/images/netlify-create-project-detail.png) +11. 如果有自定义域名可以绑定自定义域名,优选等一些列步骤。这里就不多赘述了。 +12. 访问部署好的 Umami 网页,第一次进入需要输入**默认**账号和密码。登录 Umami 后台成功后请尽快修改密码。 + - **Username**:`admin` + - **Password**:`umami` + ![umami-login-panel](../assets/images/umami-login-panel.png) +13. 登录成功后,可以在右上角切换**显示语言**。 ![umami-language-panel](../assets/images/umami-language-panel.png) +14. 至此,你已成功自托管一个 Umami 网站统计工具。恭喜你。 + +# 注意事项 +:::caution +Umami 对于从台湾地区传来的请求,默认展示为 **ROC Flag + 台湾**。请注意风险,如需更改,请手动更改 Umami 文件。 \ No newline at end of file diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 40d9fe8..766ce3e 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,9 +1,27 @@ -# About -This is the demo site for [Fuwari](https://github.com/saicaca/fuwari). +# 关于 / Hi there! +既然你来到了这里,就说明你在访问由 [Netlify](https://www.netlify.com) 托管的 [adclosenn.top](https://adclosenn.top)。 + +本站使用 [@satcaca/fuwari](https://github.com/saicaca/fuwari) 博客模板。嗯,真漂亮,真好用。 ::github{repo="saicaca/fuwari"} +::github{repo="withastro/astro"} -> ### Sources of images used in this site -> - [Unsplash](https://unsplash.com/) -> - [星と少女](https://www.pixiv.net/artworks/108916539) by [Stella](https://www.pixiv.net/users/93273965) -> - [Rabbit - v1.4 Showcase](https://civitai.com/posts/586908) by [Rabbit_YourMajesty](https://civitai.com/user/Rabbit_YourMajesty) \ No newline at end of file +## 域名 +目前你现在见到的,也就是 [adclosenn.top](https://adclosenn.top)。除了这个,还有其他的域名: + +1. adclosenn.top +2. 19991230.xyz +3. adsb.dpdns.org +4. adclosenn.dpdns.org + +--- + +## 关于我 +好了,本站的介绍完了,到介绍我自己了。 + +关于我的名字 Ad_closeNN... 你可以叫我 **Ad**、**closeNN**或**广告猫猫**。 + +一位住在[中华人民共和国广西壮族自治区梧州市](https://baike.baidu.com/item/%E6%A2%A7%E5%B7%9E%E5%B8%82/7260153)的苦逼学生。长吗?长就对了!谁让广西是自治区呢! + +### 爱好 +玩游戏、写代码、写博客(也许吧),哦,还有读书。只会一点 [Python](https://baike.baidu.com/item/Python/407313),初学者罢了。 \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index c180522..f43da5f 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -140,12 +140,66 @@ const bannerOffset = + /* https://github.com/afoim/fuwari/commit/aad0a7734be5f6e96a54a3aed51e49760ab3162a */ + 'bg-url': siteConfig.background.src ? `url(${siteConfig.background.src})` : 'none', + 'bg-enable': siteConfig.background.enable ? '1' : '0', + 'bg-position': siteConfig.background.position || 'center', + 'bg-size': siteConfig.background.size || 'cover', + 'bg-repeat': siteConfig.background.repeat || 'no-repeat', + 'bg-attachment': siteConfig.background.attachment || 'fixed', + 'bg-opacity': (siteConfig.background.opacity || 0.3).toString() + }}> + :root { + --bg-url: var(--bg-url); + --bg-enable: var(--bg-enable); + --bg-position: var(--bg-position); + --bg-size: var(--bg-size); + --bg-repeat: var(--bg-repeat); + --bg-attachment: var(--bg-attachment); + --bg-opacity: var(--bg-opacity); + } + + /* Background image configuration */ + body { + --bg-url: var(--bg-url); + --bg-enable: var(--bg-enable); + --bg-position: var(--bg-position); + --bg-size: var(--bg-size); + --bg-repeat: var(--bg-repeat); + --bg-attachment: var(--bg-attachment); + --bg-opacity: var(--bg-opacity); + } + + body::before { + content: '' !important; + position: fixed !important; + top: 0 !important; + left: 0 !important; + width: 100% !important; + height: 100% !important; + background-image: var(--bg-url) !important; + background-position: var(--bg-position) !important; + background-size: var(--bg-size) !important; + background-repeat: var(--bg-repeat) !important; + background-attachment: var(--bg-attachment) !important; + opacity: 0 !important; + pointer-events: none !important; + z-index: -1 !important; + display: block !important; + transition: opacity 0.3s ease-in-out !important; + } + + body.bg-loaded::before { + opacity: calc(var(--bg-opacity) * var(--bg-enable)) !important; + } + + + { offset = offset - offset % 4; document.documentElement.style.setProperty('--banner-height-extend', `${offset}px`); } +// Background image loading detection https://github.com/afoim/fuwari/commit/aad0a7734be5f6e96a54a3aed51e49760ab3162a +const bgUrl = getComputedStyle(document.documentElement).getPropertyValue('--bg-url').trim(); +const bgEnable = getComputedStyle(document.documentElement).getPropertyValue('--bg-enable').trim(); +if (bgUrl && bgUrl !== 'none' && bgEnable === '1') { + const img = new Image(); + const urlMatch = bgUrl.match(/url\(["']?([^"')]+)["']?\)/); + if (urlMatch) { + img.onload = function() { + // 背景图片完全加载后,显示背景并启用卡片透明效果 + document.body.classList.add('bg-loaded'); + document.documentElement.style.setProperty('--card-bg', 'var(--card-bg-transparent)'); + document.documentElement.style.setProperty('--float-panel-bg', 'var(--float-panel-bg-transparent)'); + }; + img.onerror = function() { + // Keep cards opaque if background image fails to load + console.warn('Background image failed to load, keeping cards opaque'); + }; + img.src = urlMatch[1]; + } +}