···11-# Astro Starter Kit: Minimal
11+# 📰 npmx-digest
22+33+An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 12 hours.
44+55+## ✨ Features
66+77+- 🤖 **AI-Powered Summaries** - Uses GitHub Models to generate concise summaries
88+- ⏰ **Twice Daily Updates** - Posts published at 07:00 and 23:00 CET
99+- 🎨 **Beautiful Minimalist Design** - Clean, modern interface with no framework dependencies
1010+- 📱 **Fully Responsive** - Works perfectly on all devices
1111+- 🔄 **Automated** - GitHub Actions handles everything automatically
1212+1313+## 🚀 Quick Start
1414+1515+### Prerequisites
1616+1717+- Node.js 24+ installed
1818+- GitHub account
1919+- (Optional) Bluesky account for Bluesky integration
2020+2121+### Installation
2222+2323+1. **Clone and install dependencies:**
22433-```sh
44-pnpm create astro@latest -- --template minimal
2525+```bash
2626+cd npmx-digest
2727+pnpm install
528```
62977-> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
3030+2. **Set up environment variables:**
3131+3232+Create a `.env` file in the root directory:
3333+3434+```env
3535+# Required for AI summaries and GitHub API
3636+GITHUB_TOKEN=your_github_token_here
3737+```
3838+3939+3. **Run development server:**
4040+4141+```bash
4242+pnpm dev
4343+```
4444+4545+Visit `http://localhost:4321` to see your site!
4646+4747+## 🛠️ Commands
4848+4949+| Command | Description |
5050+|---------|-------------|
5151+| `pnpm dev` | Start development server |
5252+| `pnpm build` | Build for production |
5353+| `pnpm preview` | Preview production build |
5454+| `pnpm generate` | Manually generate a new post |
5555+5656+## 📝 Manual Post Generation
5757+5858+To create a post manually:
5959+6060+```bash
6161+pnpm generate
6262+```
6363+6464+This will:
6565+1. Fetch events from GitHub and Bluesky from the last 12 hours
6666+2. Generate an AI summary using GitHub Models
6767+3. Create a JSON file in `src/content/posts/`
6868+4. Automatically determine if it's a "daily" or "nightly" post based on current time
6969+7070+## ⚙️ GitHub Actions Setup
7171+7272+The site automatically generates posts using GitHub Actions. To set this up:
7373+7474+1. **Enable GitHub Actions** in your repository settings
7575+7676+2. **Add repository secrets:**
7777+ - Go to Settings → Secrets and variables → Actions
7878+ - Add the following secrets:
7979+ - `GITHUB_TOKEN` (automatically provided by GitHub)
8080+8181+3. **Enable GitHub Pages (optional):**
8282+ - Go to Settings → Pages
8383+ - Source: GitHub Actions
8484+ - Your site will be deployed automatically after each post generation
8585+8686+The workflow runs automatically at:
8787+- **07:00 CET** (daily post)
8888+- **23:00 CET** (nightly post)
8989+9090+You can also trigger it manually from the Actions tab.
9191+9292+## 🔑 Getting Tokens
9393+9494+### GitHub Token
9595+9696+1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
9797+2. Generate new token with `repo` scope
9898+3. Copy and save the token
9999+100100+### Bluesky
101101+102102+No authentication needed! The public API is used to fetch posts.
103103+104104+## 🎨 Customization
105105+106106+### Styling
107107+108108+All styles are inline CSS using CSS custom properties. To customize colors, edit the `:root` variables in `src/layouts/Layout.astro`:
109109+110110+```css
111111+:root {
112112+ --bg-primary: #0a0a0a;
113113+ --bg-secondary: #151515;
114114+ --accent: #3b82f6;
115115+ /* ... more variables ... */
116116+}
117117+```
811899-## 🚀 Project Structure
119119+### Post Schedule
101201111-Inside of your Astro project, you'll see the following folders and files:
121121+To change when posts are generated, edit `.github/workflows/generate-post.yml`:
121221313-```text
1414-/
1515-├── public/
1616-├── src/
1717-│ └── pages/
1818-│ └── index.astro
1919-└── package.json
123123+```yaml
124124+schedule:
125125+ - cron: '0 6 * * *' # 07:00 CET (daily)
126126+ - cron: '0 22 * * *' # 23:00 CET (nightly)
20127```
211282222-Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
129129+### Sources
130130+131131+To add or modify data sources, edit `src/lib/utils.ts` and add new fetch functions.
231322424-There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
133133+## 🐛 Troubleshooting
251342626-Any static assets, like images, can be placed in the `public/` directory.
135135+**Posts not generating:**
136136+- Check GitHub Actions logs in the Actions tab
137137+- Verify environment variables are set correctly
138138+- Ensure GitHub token has necessary permissions
271392828-## 🧞 Commands
140140+**No events showing:**
141141+- Verify the GitHub repository exists and is accessible
142142+- Ensure Bluesky handle is correct
291433030-All commands are run from the root of the project, from a terminal:
144144+**Build fails:**
145145+- Run `npm run build` locally to see errors
146146+- Check that all dependencies are installed
147147+- Verify Node.js version is 18+
311483232-| Command | Action |
3333-| :------------------------ | :----------------------------------------------- |
3434-| `pnpm install` | Installs dependencies |
3535-| `pnpm dev` | Starts local dev server at `localhost:4321` |
3636-| `pnpm build` | Build your production site to `./dist/` |
3737-| `pnpm preview` | Preview your build locally, before deploying |
3838-| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
3939-| `pnpm astro -- --help` | Get help using the Astro CLI |
149149+## 📄 License
150150+151151+MIT License - feel free to use this for your own projects!
401524141-## 👀 Want to learn more?
153153+## 🤝 Contributing
421544343-Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
155155+Contributions are welcome! Please feel free to submit a Pull Request.
156156+157157+## 💡 Tips
158158+159159+- The first time you run the site, there will be no posts. Run `npm run generate` to create one.
160160+- Posts are stored as JSON files in `src/content/posts/` - you can manually edit them if needed.
161161+- The AI summary quality depends on the events found. More events = better summaries!
162162+- GitHub Models uses the `gpt-4o-mini` model by default for cost efficiency.
163163+164164+---
165165+166166+Built with [Astro](https://astro.build) 🚀