Skip to content

Peter-Pix/AutoBlog-Publisher

Repository files navigation

AutoBlog Publisher

AutoBlog Publisher is a modern React application designed to streamline the workflow for static site blogs (e.g., Next.js, Gatsby, Jekyll). It leverages Google's Gemini AI to transform raw notes and rough drafts into professionally formatted, SEO-optimized Markdown articles and publishes them directly to your GitHub repository.

Features

  • AI Content Generation: Uses the gemini-2.5-flash model to generate catchy titles, URL-friendly slugs, SEO excerpts, and structured Markdown content from simple text inputs.
  • GitHub Integration: Pushes generated .mdx or .md files directly to your specified repository and content path via the GitHub API.
  • Live Preview & Editing: Review and modify the AI-generated metadata and content before publishing.
  • Secure Configuration: GitHub Personal Access Tokens are stored securely in your browser's LocalStorage and are used directly from the client—no intermediate backend server required.
  • Responsive Design: Built with Tailwind CSS for a seamless experience on desktop and tablet.

Prerequisites

To use this application, you need:

  1. Google Gemini API Key: Obtainable from Google AI Studio.
  2. GitHub Personal Access Token: A classic or fine-grained token with repo (content write) permissions.

Installation & Setup

  1. Clone the repository (if applicable) or download the source.

  2. Install dependencies:

    npm install
  3. Environment Configuration: Create a .env file in the root directory and add your Gemini API Key. This is required for the build process to inject the key.

    API_KEY=your_actual_gemini_api_key
  4. Start the application:

    npm start

Usage Guide

  1. Configure GitHub:

    • Click the Settings (gear icon) in the top-right corner.
    • Enter your GitHub Token.
    • Enter the Owner (username or organization) and Repository name.
    • Specify the Path where blog posts are stored (e.g., content/posts or blog).
    • Click Save.
  2. Generate Content:

    • In the left-hand editor ("1. Vložte hrubý text"), paste your notes, bullet points, or a rough summary of your topic.
    • Click Vytvořit článek (Create Article).
  3. Review & Publish:

    • Wait for Gemini to generate the content.
    • In the right-hand preview ("2. Náhled a Publikace"), review the Title, Slug, Excerpt, and Markdown body. You can make manual edits here.
    • Click Publikovat na GitHub to commit the new file to your repository.

Tech Stack

  • Framework: React 19
  • Language: TypeScript
  • AI SDK: Google GenAI SDK (@google/genai)
  • Styling: Tailwind CSS
  • Icons: Lucide React

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published