Gluek's personal site and blog
https://gluek.info
- Astro 42.7%
- Python 23.5%
- TypeScript 17.8%
- JavaScript 14.2%
- CSS 1.8%
|
All checks were successful
Build & Deploy / build-deploy (push) Successful in 1m44s
|
||
|---|---|---|
| .agents/skills/wayback-blog-importer | ||
| .forgejo/workflows | ||
| .vscode | ||
| public | ||
| scripts | ||
| src | ||
| .eslintignore | ||
| .eslintrc.cjs | ||
| .gitignore | ||
| astro.config.mjs | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tailwind.config.mjs | ||
| tsconfig.json | ||
Astro Project Structure
This document describes where the main components and files are located in your Astro project.
📁 Project Structure
gluek.info/
├── public/ # Static assets (images, CSS, fonts)
├── src/ # Main source directory
│ ├── components/ # Astro components (.astro files)
│ │ ├── layout.astro # Main layout component
│ │ └── ... # Other components
│ ├── content/ # Content files (Markdown, MDX)
│ │ ├── blog/ # Blog posts
│ │ └── pages/ # Page content
│ ├── pages/ # Pages (routes)
│ │ ├── index.astro # Homepage
│ │ └── ... # Other pages
│ ├── styles/ # CSS and Tailwind configuration
│ │ └── main.css # Main stylesheet
│ ├── data/ # Project-specific data files
│ │ └── ... # JSON, YAML, or other data
│ └── config/ # Configuration files
│ ├── astro.config.mjs # Astro configuration
│ └── tailwind.config # Tailwind configuration
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── vite.config.js # Vite/Vitest configuration
📦 Key Files and Directories
public/
- Static files accessible via URL (e.g.,
/images/logo.png) - Custom CSS, JavaScript, fonts
- Icons and other assets
src/components/
- Astro components with
.astroextension - Layout component (
.astro) - Shared UI components
src/content/
- Markdown files (
.md) for blog posts - MDX files (
.mdx) with JSX support - Pages content
src/pages/
- Route definitions (
.astro) - Homepage (
index.astro) - Dynamic routes
src/styles/
- Main CSS file
- Tailwind integration files
src/data/
- Project-specific data files
- JSON/YAML configuration for content
src/config/
- Astro configuration (
astro.config.mjs) - Tailwind configuration
🚀 Quick Commands
| Command | Action |
|---|---|
npm install |
Install dependencies |
npm run dev |
Start dev server |
npm run build |
Build production site |
npm run preview |
Preview build locally |
📝 Development Workflow
- Components: Add new
.astrofiles insrc/components/ - Pages: Create route files in
src/pages/ - Content: Write Markdown in
src/content/ - Assets: Place images in
public/images/
🛠️ Tech Stack
- Framework: Astro
- Styling: Tailwind CSS
- Language: TypeScript
- Build: Vite
📢 Настройка кросспостинга (Telegram & Mastodon)
При автоматическом деплое (пуше новых постов в main) выполняются скрипты кросспостинга, которые публикуют анонсы новых статей в Telegram-канал и Mastodon.
✈️ 1. Настройка Telegram
- Создайте бота в Telegram:
- Напишите @BotFather и создайте нового бота (
/newbot). - Скопируйте Token (например,
123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).
- Напишите @BotFather и создайте нового бота (
- Добавьте бота в ваш Telegram-канал:
- Назначьте бота администратором канала с правом публикаций сообщений (Post Messages).
- Настройте секреты в Forgejo:
- Перейдите в настройки репозитория: Settings → Secrets.
- Добавьте два секрета:
TELEGRAM_BOT_TOKEN: токен вашего бота.TELEGRAM_CHAT_ID:@channel_name(юзернейм канала) или ID канала (например,-1001234567890).
🐘 2. Настройка Mastodon
- Создайте Access Token:
- Откройте веб-интерфейс mastodon.social (или вашего инстанса).
- Перейдите в Preferences → Development → New Application.
- Укажите название приложения (например,
gluek.info) и отметьте scopewrite:statuses. - Сохраните и скопируйте Your access token.
- Настройте секреты в Forgejo:
- Перейдите в настройки репозитория: Settings → Secrets.
- Добавьте секрет:
MASTODON_ACCESS_TOKEN: ваш токен из Mastodon.- (Опционально)
MASTODON_SERVER: адрес сервера (по умолчаниюhttps://mastodon.social).
ℹ️ Особенности работы
- Скрипты анализируют
git diffпоследнего коммита. - Пропускают посты с
draft: trueи редактирование старых уже опубликованных статей. - Форматируют анонс со ссылкой вида
https://gluek.info/blog/<slug>/. - Для Mastodon длинные описания автоматически обрезаются с учётом лимита в 500 символов.
- Если секреты какого-либо сервиса не заданы в Forgejo, соответствующий шаг кросспостинга безопасно пропускается без ошибок деплоя.
Last updated: 2026-07-29