Gluek's personal site and blog https://gluek.info
  • Astro 35%
  • TypeScript 23.1%
  • JavaScript 21.7%
  • Python 18.8%
  • CSS 1.4%
Find a file
Gluek a5552c860f
All checks were successful
Build & Deploy / build-deploy (push) Successful in 58s
feat: skip crossposting archive posts and improve rename/link handling in scripts
2026-08-19 00:23:41 +03:00
.agents feat(rss): deliver full article content & limit RSS items to 10; add fast build mode 2026-08-13 10:54:03 +03:00
.forgejo/workflows perf: fix actions/cache key to save og-cache and widen fallback window for crossposting 2026-08-13 01:28:38 +03:00
.vscode Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
public refactor: migrate welcome blog post, update redirect, clean up footer, and silence unused regex match variables in crosspost script 2026-08-19 00:19:06 +03:00
scripts feat: skip crossposting archive posts and improve rename/link handling in scripts 2026-08-19 00:23:41 +03:00
src refactor: migrate welcome blog post, update redirect, clean up footer, and silence unused regex match variables in crosspost script 2026-08-19 00:19:06 +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 refactor: unify image URLs between web pages and RSS feed under /blog/<slug>/<name>.webp 2026-08-13 11:22:37 +03:00
LICENSE Initial commit: Astro Nano blog 2026-07-11 23:08:33 +01:00
package-lock.json feat(rss): deliver full article content & limit RSS items to 10; add fast build mode 2026-08-13 10:54:03 +03:00
package.json feat(rss): deliver full article content & limit RSS items to 10; add fast build mode 2026-08-13 10:54:03 +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