feat: scaffold Astro 7 with Tailwind 4, MDX, sitemap, node adapter and tooling
- Tailwind v4 via @tailwindcss/vite + typography plugin - astro-icon (Tabler), self-hosted Rubik/Inter, RSS, Pagefind postbuild - Prettier (astro + tailwind plugins), editorconfig - new:post script with Turkish-aware slugify Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -22,3 +22,6 @@ pnpm-debug.log*
|
||||
|
||||
# jetbrains setting folder
|
||||
.idea/
|
||||
|
||||
# local data (view counter SQLite)
|
||||
data/
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
dist/
|
||||
.astro/
|
||||
node_modules/
|
||||
package-lock.json
|
||||
docs/
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"printWidth": 100,
|
||||
"plugins": ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
|
||||
"tailwindStylesheet": "./src/styles/global.css",
|
||||
"overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
|
||||
}
|
||||
+31
-21
@@ -1,47 +1,57 @@
|
||||
# PROJECT_MEMORY — ta1sph.info
|
||||
|
||||
> Claude'un bu proje için kalıcı hafızası. Her görev sonunda güncellenir. Kısa ve güncel tutulur.
|
||||
> Son güncelleme: 2026-10-15 · Güncelleyen: kurulum kiti
|
||||
> Son güncelleme: 2026-10-16 · Güncelleyen: Claude (Siteyi Kur — Aşama 1)
|
||||
|
||||
## 1. Durum
|
||||
|
||||
- **Aşama:** 0 — Proje henüz kurulmadı. Sıradaki komut: `Siteyi Kur`.
|
||||
- **Tamamlanan:** Skill + hafıza dosyaları eklendi.
|
||||
- **Açık işler:** Aşama 0–8 (`references/build-plan.md`).
|
||||
- **Aşama:** 1 tamamlandı (iskelet). Sıradaki: **Aşama 2 — Tasarım sistemi ve layout**.
|
||||
- **Tamamlanan:** Aşama 0 (ön kontrol), Aşama 1 (entegrasyonlar, script'ler, Prettier, hafıza dosyaları repoda).
|
||||
- **Açık işler:** Aşama 2–8 (`references/build-plan.md`). `LICENSE` / `LICENSE-CONTENT` Aşama 6'da (README şimdiden bağlantı veriyor).
|
||||
- **Bilinen sorunlar:** —
|
||||
|
||||
## 2. Ortam
|
||||
|
||||
- Astro sürümü: _(Aşama 0'da doldurulacak)_
|
||||
- TailwindCSS sürümü: _(Aşama 0'da doldurulacak)_
|
||||
- Node sürümü: _(Aşama 0'da doldurulacak)_
|
||||
- Repo: _(doldurulacak)_ · Branch: `main`
|
||||
- Astro 7.4.0 · TailwindCSS 4.3.3 (`@tailwindcss/vite`) · TypeScript 6 strict · zod = `astro/zod` (ayrı paket yok)
|
||||
- @astrojs/node 11.1.8 · mdx 8.1.0 · sitemap 3.7.4 · rss 4.0.19 · astro-icon 1.2.0 · pagefind 1.5.2
|
||||
- Yerel: Node v26.11.1, npm 12.2.0, Docker 29.8.1 · `package.json` engines: node >=22.22
|
||||
- Repo: yerel git (Gitea remote henüz yok; push yalnızca kullanıcı onayıyla) · Branch: `main`
|
||||
- Canlı: https://ta1sph.info (Dokploy, HomeServer Atlas) — _henüz yayında değil_
|
||||
|
||||
## 3. Dosya Haritası
|
||||
|
||||
_(Kurulumdan sonra önemli dosya/klasörler tek satır açıklamayla buraya yazılır.)_
|
||||
- `astro.config.mjs` — site/trailingSlash/static + node adapter, mdx, sitemap (`/_styleguide/` hariç), astro-icon (tabler), Tailwind vite plugin
|
||||
- `src/styles/global.css` — Tailwind girişi + typography plugin (token'lar Aşama 2'de)
|
||||
- `src/lib/slug.ts` — Türkçe karakter dönüştürücü `slugify`
|
||||
- `scripts/new-post.mjs` — `npm run new:post -- "Başlık"` → `src/content/blog/<slug>/index.md` (draft: true); `slug.ts`'yi Node type-stripping ile import eder
|
||||
- `src/pages/index.astro` — geçici yer tutucu (Aşama 3'te değişecek)
|
||||
- `docs/design-reference/` — Huemint Magazine ekran görüntüleri · `CLAUDE.md` → `AGENTS.md` + bu dosya
|
||||
- Build: `astro build && pagefind --site dist/client` · statik çıktı `dist/client`, sunucu `dist/server/entry.mjs`
|
||||
|
||||
## 4. Kararlar (ADR)
|
||||
|
||||
| Tarih | Karar | Gerekçe |
|
||||
|---|---|---|
|
||||
| Tarih | Karar | Gerekçe |
|
||||
| ---------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| 2026-10-15 | Statik çıktı + `@astrojs/node` ile sadece `/api/views` dinamik | "Öne çıkan = en çok okunan" için sayaç gerekli; site geri kalanı statik ve hızlı |
|
||||
| 2026-10-15 | Sayaç: SQLite (`better-sqlite3`), volume `/app/data` | Harici servis yok, ev sunucusunda basit ve kalıcı |
|
||||
| 2026-10-15 | Arama: Pagefind | Statik, sunucusuz, Türkçe destekli |
|
||||
| 2026-10-15 | Harita: Leaflet + OpenStreetMap | API anahtarı / ücret yok, KVKK dostu |
|
||||
| 2026-10-15 | İkonlar: astro-icon + Tabler | Tutarlı çizgi seti, anten kulesi ve marka ikonları mevcut |
|
||||
| 2026-10-15 | Lisans: Kod MIT, içerik CC BY-SA 4.0 | Kaynak gösterilerek serbest kullanım talebi |
|
||||
| 2026-10-15 | Kanonik alan: apex `ta1sph.info`, www → 301 | SEO tekilleştirme |
|
||||
| 2026-10-15 | Fontlar self-host (Fontsource: Rubik + Inter) | Performans + gizlilik |
|
||||
| 2026-10-15 | Locator KN41KB99HW → 41.08307 N, 28.91094 E | Harita merkezi |
|
||||
| 2026-10-15 | Sayaç: SQLite (`better-sqlite3`), volume `/app/data` | Harici servis yok, ev sunucusunda basit ve kalıcı |
|
||||
| 2026-10-15 | Arama: Pagefind | Statik, sunucusuz, Türkçe destekli |
|
||||
| 2026-10-15 | Harita: Leaflet + OpenStreetMap | API anahtarı / ücret yok, KVKK dostu |
|
||||
| 2026-10-15 | İkonlar: astro-icon + Tabler | Tutarlı çizgi seti, anten kulesi ve marka ikonları mevcut |
|
||||
| 2026-10-15 | Lisans: Kod MIT, içerik CC BY-SA 4.0 | Kaynak gösterilerek serbest kullanım talebi |
|
||||
| 2026-10-15 | Kanonik alan: apex `ta1sph.info`, www → 301 | SEO tekilleştirme |
|
||||
| 2026-10-15 | Fontlar self-host (Fontsource: Rubik + Inter) | Performans + gizlilik |
|
||||
| 2026-10-16 | Pagefind CLI postbuild (`astro-pagefind` yok) | Daha az bağımlılık; node adapter çıktısı `dist/client` |
|
||||
| 2026-10-16 | Skill repoya kopyalanmadı, kullanıcı düzeyinde | Çift kopya senkron riski |
|
||||
| 2026-10-15 | Locator KN41KB99HW → 41.08307 N, 28.91094 E | Harita merkezi |
|
||||
|
||||
## 5. İçerik Envanteri
|
||||
|
||||
| Slug | Başlık | Kategori | Oluşturma | Güncelleme | Durum |
|
||||
|---|---|---|---|---|---|
|
||||
| — | — | — | — | — | — |
|
||||
| ---- | ------ | -------- | --------- | ---------- | ----- |
|
||||
| — | — | — | — | — | — |
|
||||
|
||||
## 6. Değişiklik Günlüğü (en yeni üstte)
|
||||
|
||||
- 2026-10-16 | Siteyi Kur A1 | İskelet: Tailwind 4, mdx, sitemap, node, icon, rss, fontlar, pagefind, prettier, new:post | `astro.config.mjs`, `package.json`, `scripts/`, `src/lib/slug.ts`, `src/styles/`, `README.md`
|
||||
- 2026-10-16 | Siteyi Kur A0 | Ortam kontrolü; hafıza + docs kitten projeye kopyalandı | `CLAUDE.md`, `PROJECT_MEMORY.md`, `docs/`
|
||||
- 2026-10-15 | Kurulum | Skill, CLAUDE.md ve PROJECT_MEMORY.md eklendi | `.claude/`, `CLAUDE.md`, `PROJECT_MEMORY.md`
|
||||
|
||||
@@ -1,43 +1,23 @@
|
||||
# Astro Starter Kit: Minimal
|
||||
# ta1sph.info
|
||||
|
||||
```sh
|
||||
npm create astro@latest -- --template minimal
|
||||
```
|
||||
Suphi Çakır (TA1SPH) — amatör telsizcilik blog & portfolyo sitesi.
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
- **Stack:** Astro 7 · TailwindCSS 4 · TypeScript (strict)
|
||||
- **Çıktı:** statik site + `@astrojs/node` (yalnızca görüntülenme sayacı API'si dinamik)
|
||||
- **Yayın:** Docker → Dokploy (HomeServer Atlas) → https://ta1sph.info
|
||||
|
||||
## 🚀 Project Structure
|
||||
## Komutlar
|
||||
|
||||
Inside of your Astro project, you'll see the following folders and files:
|
||||
| Komut | Açıklama |
|
||||
| :----------------------------- | :--------------------------------------------------- |
|
||||
| `npm install` | Bağımlılıkları kurar |
|
||||
| `npm run dev` | Geliştirme sunucusu (`localhost:4321`) |
|
||||
| `npm run check` | `astro check` (tip ve şablon kontrolü) |
|
||||
| `npm run build` | Üretim derlemesi + Pagefind arama indeksi |
|
||||
| `npm run preview` | Derlenmiş siteyi yerelde çalıştırır |
|
||||
| `npm run format` | Prettier ile biçimlendirir |
|
||||
| `npm run new:post -- "Başlık"` | `src/content/blog/<slug>/index.md` taslağı oluşturur |
|
||||
|
||||
```text
|
||||
/
|
||||
├── public/
|
||||
├── src/
|
||||
│ └── pages/
|
||||
│ └── index.astro
|
||||
└── package.json
|
||||
```
|
||||
## Lisans
|
||||
|
||||
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.
|
||||
|
||||
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?
|
||||
|
||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
Kod [MIT](LICENSE), içerik [CC BY-SA 4.0](LICENSE-CONTENT).
|
||||
|
||||
+21
-1
@@ -1,5 +1,25 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import mdx from '@astrojs/mdx';
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
import node from '@astrojs/node';
|
||||
import icon from 'astro-icon';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({});
|
||||
export default defineConfig({
|
||||
site: 'https://ta1sph.info',
|
||||
trailingSlash: 'always',
|
||||
// Static by default; only routes with `export const prerender = false` (view counter API) run on the server.
|
||||
output: 'static',
|
||||
adapter: node({ mode: 'standalone' }),
|
||||
integrations: [
|
||||
mdx(),
|
||||
sitemap({ filter: (page) => !page.includes('/_styleguide/') }),
|
||||
icon({ include: { tabler: ['*'] } }),
|
||||
],
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
});
|
||||
|
||||
Generated
+2731
-8
File diff suppressed because it is too large
Load Diff
+26
-2
@@ -7,11 +7,35 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"build": "astro build && pagefind --site dist/client",
|
||||
"check": "astro check",
|
||||
"preview": "astro preview",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"new:post": "node scripts/new-post.mjs",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"astro": "^7.4.0"
|
||||
"@astrojs/markdown-satteri": "^0.4.4",
|
||||
"@astrojs/mdx": "^8.1.0",
|
||||
"@astrojs/node": "^11.1.8",
|
||||
"@astrojs/rss": "^4.0.19",
|
||||
"@astrojs/sitemap": "^3.7.4",
|
||||
"@fontsource-variable/inter": "^5.3.0",
|
||||
"@fontsource-variable/rubik": "^5.3.0",
|
||||
"@iconify-json/tabler": "^1.2.42",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"astro": "^7.4.0",
|
||||
"astro-icon": "^1.2.0",
|
||||
"tailwindcss": "^4.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.10",
|
||||
"@tailwindcss/typography": "^0.5.20",
|
||||
"pagefind": "^1.5.2",
|
||||
"prettier": "^3.9.10",
|
||||
"prettier-plugin-astro": "^1.1.1",
|
||||
"prettier-plugin-tailwindcss": "^0.8.1",
|
||||
"typescript": "^6.0.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
// Usage: npm run new:post -- "Yazı Başlığı"
|
||||
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { slugify } from '../src/lib/slug.ts';
|
||||
|
||||
const title = process.argv.slice(2).join(' ').trim();
|
||||
if (!title) {
|
||||
console.error('Kullanım: npm run new:post -- "Yazı Başlığı"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const slug = slugify(title);
|
||||
const dir = join('src', 'content', 'blog', slug);
|
||||
if (existsSync(dir)) {
|
||||
console.error(`Zaten var: ${dir}`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const today = new Intl.DateTimeFormat('en-CA', { timeZone: 'Europe/Istanbul' }).format(new Date());
|
||||
const body = `---
|
||||
title: ${JSON.stringify(title)}
|
||||
description: "Arama sonuçlarında görünecek 120–155 karakterlik açıklama."
|
||||
pubDate: ${today}
|
||||
# updatedDate: ${today}
|
||||
category: "genel"
|
||||
tags: []
|
||||
# cover: "./kapak.jpg"
|
||||
# coverAlt: "Kapak görselinin anlamlı açıklaması"
|
||||
featured: false
|
||||
diy: false
|
||||
draft: true
|
||||
---
|
||||
|
||||
Giriş paragrafı: yazının neyi anlattığını ve okuyucunun ne kazanacağını 2–3 cümlede söyle.
|
||||
|
||||
## Birinci Bölüm
|
||||
|
||||
Metin…
|
||||
|
||||
## Sonuç
|
||||
|
||||
Kısa özet ve varsa sonraki adımlar.
|
||||
|
||||
73 de TA1SPH
|
||||
`;
|
||||
|
||||
mkdirSync(dir, { recursive: true });
|
||||
writeFileSync(join(dir, 'index.md'), body);
|
||||
console.log(`Oluşturuldu: ${join(dir, 'index.md')} (draft: true)`);
|
||||
@@ -0,0 +1,25 @@
|
||||
const TR_MAP: Record<string, string> = {
|
||||
ç: 'c',
|
||||
ğ: 'g',
|
||||
ı: 'i',
|
||||
İ: 'i',
|
||||
ö: 'o',
|
||||
ş: 's',
|
||||
ü: 'u',
|
||||
Ç: 'c',
|
||||
Ğ: 'g',
|
||||
Ö: 'o',
|
||||
Ş: 's',
|
||||
Ü: 'u',
|
||||
};
|
||||
|
||||
/** Turkish-aware slugify: "Çift Bant Anten" → "cift-bant-anten". */
|
||||
export function slugify(input: string): string {
|
||||
return input
|
||||
.replace(/[çğıİöşüÇĞÖŞÜ]/g, (ch) => TR_MAP[ch] ?? ch)
|
||||
.normalize('NFKD')
|
||||
.replace(/[̀-ͯ]/g, '')
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/g, '-')
|
||||
.replace(/^-+|-+$/g, '');
|
||||
}
|
||||
+13
-12
@@ -1,16 +1,17 @@
|
||||
---
|
||||
// Temporary placeholder; replaced by the real home page in stage 3.
|
||||
import '../styles/global.css';
|
||||
---
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>Astro</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Astro</h1>
|
||||
</body>
|
||||
<html lang="tr">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<title>TA1SPH</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="p-8 text-4xl font-black">TA1SPH</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
@import 'tailwindcss';
|
||||
@plugin '@tailwindcss/typography';
|
||||
Reference in New Issue
Block a user