A static site generator for RSS feeds, inspired by Brutalist Report aesthetics.
This project generates a static site from RSS feeds, resulting in a lightweight UI that loads quickly with minimal dependencies. The static site is generated when feed contents are updated.
- Static site generation from RSS feeds
- Brutalist aesthetic design
- OpenAI integration for content summarization
- Configurable feeds
- Fast loading times with minimal client-side dependencies
config/- Configuration files for feedsstatic-generator/- Code for generating the static siteservices/- Service modules for RSS, content, and OpenAI integrationsteps/- Modular implementation of the RSS processing pipelinetemplates/- EJS templates and CSS for the static site
.github/workflows/- GitHub Actions workflows for deployment
Main dependencies:
cheerio- HTML parsing and manipulationdotenv- Environment variable managementejs- Templating enginegot- HTTP clientopenai- OpenAI API clientreact- UI component libraryrss-parser- RSS feed parsingws- WebSocket implementationzod- Schema validation
Dev dependencies:
tsx- TypeScript executiontypescript- TypeScript language supportvite- Build tool and development server
# Clone the repository
git clone [repository-url]
cd [repository-directory]
# Install dependencies
npm install
# Create .env file from example
cp .env.example .env
# Edit .env with your own valuesAvailable npm commands:
# Start the development server
npm run dev
# Build the static site (run all steps)
npm run build
# Run individual steps of the build process
npm run step1 # Fetch RSS feeds
npm run step2 # Extract content
npm run step3 # Process content
npm run step4 # Process with OpenAI
npm run step5 # Generate HTML
# Preview the built static site
npm run previewThe project uses environment variables for configuration. Create a .env file in the root directory of the project (copy from .env.example) and add your values:
# OpenAI API Configuration
OPENAI_API_KEY=your-openai-api-key-here
OPENAI_API_BASE_URL=http://your-custom-openai-endpoint:port/v1
OPENAI_MODEL_NAME=gpt-3.5-turbo
# Feed Configuration
MAX_ITEMS_PER_FEED=10
# Build Configuration
NODE_ENV=production
OPENAI_API_KEY=your-api-key
OPENAI_API_BASE_URL=http://your-custom-endpoint:port/v1 (optional)
OPENAI_MODEL_NAME=gpt-3.5-turbo (optional)
If OPENAI_API_BASE_URL is not provided, the application will use the default OpenAI API endpoint.
MAX_ITEMS_PER_FEED=10 (optional, defaults to 10)
This variable controls how many items are fetched from each RSS feed.
The project uses GitHub Actions for automated deployment and other CI/CD tasks. The workflows are defined in the .github/workflows directory.
The deployment workflow (.github/workflows/deploy.yml) automates the process of building and deploying the static site:
- Triggers on pushes to the main branch
- Sets up Node.js environment
- Installs dependencies
- Fetches content from RSS feeds
- Builds the static site
- Deploys the built site to the hosting platform
The project can use Ollama as a drop-in replacement for the OpenAI API in GitHub Actions:
- Allows running AI operations locally on GitHub runners
- Provides format translation between OpenAI and Ollama APIs
- No code changes needed - works as a drop-in replacement
- Configurable to use different models
- Reduces dependency on external API services
The static site generation process is divided into five distinct steps, each with its own cache file:
-
Step 1: Fetch Feeds
- Fetches content from configured RSS feeds
- Saves raw feed data to
.cache/step1-raw-feeds.json
-
Step 2: Extract Content
- Loads the raw feed data from Step 1
- Extracts content from URLs
- Saves extracted content to
.cache/step2-extracted-content.json
-
Step 3: Process Content
- Loads the extracted content from Step 2
- Processes the content (media type detection, etc.)
- Saves processed content to
.cache/step3-processed-content.json
-
Step 4: Process with OpenAI
- Loads the processed content from Step 3
- Generates summaries using OpenAI
- Performs sentiment analysis
- Saves AI processed content to
.cache/step4-ai-processed-content.json
-
Step 5: Generate HTML
- Loads the AI processed content from Step 4
- Uses EJS templates to generate HTML pages
- Outputs the static site to the
distdirectory
This modular approach makes it easier to test, debug, and maintain each part of the process independently. See static-generator/steps/README.md for more details.
GitHub Actions can be used for automated deployment of the final static site.
MIT