Skip to content

Repository files navigation

📊 Excel Formula Hub (pSEO Experiment)

A programmatic SEO project built with Python, Gemini Flash API, and Astro. Instead of writing articles manually, this project generates scenario-based Excel guides automatically.

🔗 Live Demo: 1

wechat_longscreenshot_2025-12-08_013558_003

💡 The Concept

Most Excel tutorial sites are just dictionaries of syntax. I wanted to build something different: a Problem-Based guide.

Instead of just explaining VLOOKUP, this site generates pages for specific user personas, like:

  • "How HR Managers use VLOOKUP to calculate bonuses"
  • "How Sales Reps use SUMIF to track regional performance"

This is achieved through Programmatic SEO (pSEO), turning structured data into thousands of static pages.

🛠️ Tech Stack

  • Data Engineering: Python + Pandas
  • Content Generation: Google Gemini 2.5 Flash API
  • Frontend: Astro (Static Site Generation)
  • Styling: Tailwind CSS (Manual CLI Build for stability)
  • Deployment: Vercel

⚙️ How it Works (The Pipeline)

  1. Seed Data: I defined a list of target Excel functions in Python.
  2. AI Generation: The data_generator.py script prompts the Gemini API to generate structured JSON data. It enforces a strict schema including:
    • User Persona & Problem Scenario
    • Step-by-step Solution
    • Mock CSV Data for visualization
  3. Static Build: Astro reads the generated JSON (src/data/gemini_excel_data.json) and renders static HTML pages at build time using dynamic routing ([slug].astro).

📂 Project Structure

├── src/
│   ├── data/            # The "Database" (JSON files generated by Python)
│   ├── pages/           # Astro templates & routing logic
│   └── styles/          # Tailwind CSS source
├── data_generator.py    # Python script for AI content generation
├── astro.config.mjs     # Astro configuration
└── package.json         # Dependencies

🚀 Getting Started

If you want to run this project locally or fork it for your own pSEO experiment:

1. Clone the repo

<BASH>
git clone https://github.com/Jillllllllllll/excel-pseo-hub.git
cd excel-pseo-hub

2. Install Dependencies

<BASH>
npm install

3. Generate Data (Optional)

Note: The repo comes with sample data. If you want to generate new content, you need a Gemini API Key.

<BASH>
# Set your API Key
export GOOGLE_API_KEY="your_gemini_api_key"
# Run the generator
python data_generator.py

4. Build CSS & Run Dev Server

We use a manual Tailwind build step for maximum control.

<BASH>
# Generate CSS and start Astro
npm run dev

⚠️ Deployment Note

This project uses a custom build command to ensure Tailwind CSS is generated correctly before Astro builds the site. In Vercel, the build command is set to: npm run build (which runs npm run build:css && astro build)

📝 License

MIT License. Feel free to use this architecture for your own projects!


Built by Jillllllllllll as a pSEO experiment.

Releases

Packages

Contributors

Languages