From a simple idea to a published article, fully automated.
Fetches a dynamic, pre-engineered prompt from an external API. This acts as the creative brief for the AI and can be updated without changing the application code.
Sends the prompt to the Google Gemini API, which interprets the instructions and generates a complete, high-quality article in Markdown format.
The generated article is sent back to the Gemini API, which extracts key information and returns an SEO-friendly description and relevant tags as structured JSON data.
Assembles the final `.md` file by formatting the SEO metadata into a YAML "frontmatter" block and prepending it to the Markdown article content.
The completed file is automatically placed in a Git repository. The script then runs `git add`, `commit`, and `push` to deploy the article to a live website via a hosting service like Vercel.