Gluek's personal site and blog https://gluek.info
  • Astro 42.7%
  • Python 23.5%
  • TypeScript 17.8%
  • JavaScript 14.2%
  • CSS 1.8%
Find a file
Gluek 5bdf5cc09c
All checks were successful
Build & Deploy / build-deploy (push) Successful in 1m44s
Fix props in blog OG image generator (props: post instead of props: { post })
2026-07-30 01:35:27 +03:00
.agents/skills/wayback-blog-importer feat: import archive of historical blog posts and associated media assets 2026-07-29 01:39:00 +03:00
.forgejo/workflows feat: add Telegram and Mastodon crossposting and announcement post 2026-07-29 23:45:12 +03:00
.vscode Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
public feat: add blue 24k stream icon and update corresponding blog post reference 2026-07-29 09:25:38 +03:00
scripts feat: add Telegram and Mastodon crossposting and announcement post 2026-07-29 23:45:12 +03:00
src Fix props in blog OG image generator (props: post instead of props: { post }) 2026-07-30 01:35:27 +03:00
.eslintignore Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
.eslintrc.cjs Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
.gitignore feat: move OG image cache to project root and add CI persistence 2026-07-29 09:48:37 +03:00
astro.config.mjs Rename welcome post slug and add redirect 2026-07-11 23:54:29 +01:00
LICENSE Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
package-lock.json feat: add automatic Open Graph image generation via satori and resvg 2026-07-28 00:08:11 +03:00
package.json feat: add automatic Open Graph image generation via satori and resvg 2026-07-28 00:08:11 +03:00
README.md feat: add Telegram and Mastodon crossposting and announcement post 2026-07-29 23:45:12 +03:00
tailwind.config.mjs Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
tsconfig.json Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00

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 .astro extension
  • 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

  1. Components: Add new .astro files in src/components/
  2. Pages: Create route files in src/pages/
  3. Content: Write Markdown in src/content/
  4. Assets: Place images in public/images/

🛠️ Tech Stack

  • Framework: Astro
  • Styling: Tailwind CSS
  • Language: TypeScript
  • Build: Vite

📢 Настройка кросспостинга (Telegram & Mastodon)

При автоматическом деплое (пуше новых постов в main) выполняются скрипты кросспостинга, которые публикуют анонсы новых статей в Telegram-канал и Mastodon.


✈️ 1. Настройка Telegram

  1. Создайте бота в Telegram:
    • Напишите @BotFather и создайте нового бота (/newbot).
    • Скопируйте Token (например, 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ).
  2. Добавьте бота в ваш Telegram-канал:
    • Назначьте бота администратором канала с правом публикаций сообщений (Post Messages).
  3. Настройте секреты в Forgejo:
    • Перейдите в настройки репозитория: Settings → Secrets.
    • Добавьте два секрета:
      • TELEGRAM_BOT_TOKEN: токен вашего бота.
      • TELEGRAM_CHAT_ID: @channel_name (юзернейм канала) или ID канала (например, -1001234567890).

🐘 2. Настройка Mastodon

  1. Создайте Access Token:
    • Откройте веб-интерфейс mastodon.social (или вашего инстанса).
    • Перейдите в Preferences → Development → New Application.
    • Укажите название приложения (например, gluek.info) и отметьте scope write:statuses.
    • Сохраните и скопируйте Your access token.
  2. Настройте секреты в 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