General Questions
How do I change the schedule?
How do I change the schedule?
The schedule is configured in Common Schedule Examples:Cron Format:
.github/workflows/actualizar.yml using cron syntax.Current Schedule:minute hour day month day-of-weekSteps to change:- Edit
.github/workflows/actualizar.yml - Modify the cron expression
- Commit and push the changes
- The new schedule will take effect immediately
Scheduled workflows may be delayed by 10-15 minutes during high-load periods on GitHub’s servers.
Can I use a different AI model?
Can I use a different AI model?
Yes! You can change the AI model used for story generation.Current Model:How to Change:Paid Models (require credits):Testing Different Models:
Different models may have varying:
- Open
generar_historia.py - Find line 23 with the model specification
- Replace with your preferred model
- Commit and push
Check OpenRouter’s models page for the complete list of available models and their pricing.
- Response times
- Creative writing quality
- Ability to follow the format instructions
- Rate limits and costs
How do I customize the HTML design?
How do I customize the HTML design?
The design is controlled by Customization Ideas:1. Change Colors:2. Modify Typography:3. Adjust Layout:4. Add Dark Mode:
plantilla.html, which contains all HTML, CSS, and JavaScript.Structure:What happens if the API fails?
What happens if the API fails?
The script includes built-in error handling to ensure the site continues to function.Error Handling Code:Fallback Behavior:
- Title: Displays “Error”
- Story: Shows “Fallo al conectar con la API.”
- Image: Still generates a random image (using the “error” seed)
- History: The entry is still added to
historial.json - Files: HTML files are still created and committed
- Your site will never break completely
- The sidebar menu continues to work
- Previous stories remain accessible
- GitHub Pages continues serving the site
- Invalid or expired API key
- OpenRouter service outage
- Network connectivity issues
- Rate limit exceeded
- Model temporarily unavailable
- Left as is (historical record)
- Manually deleted from the repository
- Overwritten by manually triggering the workflow on the same day
Can I generate stories manually?
Can I generate stories manually?
Yes! You can manually trigger the workflow at any time.Using GitHub Interface:When to Use Manual Triggers:
- Go to your repository on GitHub
- Click the Actions tab
- Select “Actualizar Historia Diaria” from the left sidebar
- Click the “Run workflow” dropdown button (top right)
- Select the branch (usually
main) - Click “Run workflow”
workflow_dispatch:- Testing after making configuration changes
- Generating multiple stories in one day
- Recovering from an API failure
- Creating a story outside the normal schedule
- If run on the same day: Updates the existing story for that day
- If run on a new day: Creates a new story entry
- The logic in
generar_historia.pyhandles updates:
Multiple manual runs on the same day will overwrite the story, not create duplicates.
How do I view the generated stories?
How do I view the generated stories?
Your stories are automatically published to GitHub Pages.Accessing Your Site:
The URL format is:For example:
- Username:
juanperez - Repository:
historia-diaria - URL:
https://juanperez.github.io/historia-diaria/
- Go to repository Settings
- Click Pages in the left sidebar
- Under “Source”, select Deploy from a branch
- Choose branch:
mainormaster - Choose folder:
/ (root) - Click Save
- Wait 2-3 minutes for deployment
- Today’s story:
https://[username].github.io/[repo]/ - Specific date:
https://[username].github.io/[repo]/historia-2026-03-05.html
- Click the ☰ menu button (top left) to open the sidebar
- Sidebar shows all stories organized by month
- Click any story title to view it
- The menu updates automatically with each new story
index.html- Always shows today’s storyhistoria-YYYY-MM-DD.html- Individual dated storieshistorial.json- Metadata for the sidebar menu
GitHub Pages updates within 1-2 minutes after each commit. If you don’t see changes immediately, refresh the page or clear your browser cache.
What's the cost of running this?
What's the cost of running this?
The cost depends on your choice of AI model and usage.Free Components:Free AI Models (Current Setup):Other free options:
Total Cost:
- ✅ GitHub Actions: 2,000 minutes/month for free accounts (this uses ~1 minute per run)
- ✅ GitHub Pages: Free hosting for public repositories
- ✅ Picsum Photos: Free random images
- ✅ OpenRouter Free Models: Several models available at no cost
google/gemini-flash-1.5- Freemeta-llama/llama-3-8b-instruct:free- Freeanthropic/claude-3-haiku:free- Free (with limits)
| Model | Cost per Story | Monthly (30 days) |
|---|---|---|
| GPT-3.5 Turbo | ~$0.002 | ~$0.06 |
| GPT-4 Turbo | ~$0.02 | ~$0.60 |
| Claude 3.5 Sonnet | ~$0.015 | ~$0.45 |
| Gemini Pro | ~$0.001 | ~$0.03 |
Actual costs vary based on story length and model pricing updates. Check OpenRouter pricing for current rates.
- Default setup (free model): $0.00/month
- With paid model: 0.60/month
- Check your OpenRouter dashboard for API usage
- View GitHub Actions usage: Settings → Billing → Plans and usage
- Free tier limits are more than sufficient for daily story generation
Can I use a different template?
Can I use a different template?
Yes! You can completely redesign the template or use multiple templates.Current Template System:Method 1: Replace the Entire TemplateMethod 3: Theme-Based Templates
Choose template based on story genre or day of week:Minimal Template Example:
- Create your new HTML template
- Include the required placeholders:
{{TITULO}}- Story title{{HISTORIA}}- Story content{{IMAGEN_URL}}- Image URL{{MENU}}- Sidebar navigation
- Replace
plantilla.htmlin your repository - Commit and push
How do I backup my stories?
How do I backup my stories?
Your stories are already safely stored in Git, but here are additional backup strategies.Built-in Backup: Git History
Every story is automatically committed to your repository:Benefits:Method 2: Download as ZIPMethod 4: Export to JSON
Create a script to extract all stories:Method 5: GitHub Release Archive
Create periodic releases:
- Complete version history
- Every story is preserved
- Can restore any previous version
- Distributed backup (on GitHub’s servers)
- Go to your repository on GitHub
- Click the green Code button
- Select Download ZIP
- Extract and store in a safe location
- Go to your repository
- Click Releases → Create a new release
- Tag version (e.g.,
v2026.03for March 2026) - GitHub automatically archives the code at that point
- ✅
historia-*.html- All story files - ✅
historial.json- Navigation metadata - ✅
index.html- Latest story - ✅
plantilla.html- Template - ✅
generar_historia.py- Script - ✅
.github/workflows/actualizar.yml- Workflow config
With Git, you inherently have a complete backup. Every commit is a snapshot, and GitHub stores everything securely.
Can I change the language?
Can I change the language?
Yes! You can configure the system to generate stories in any language.Current Configuration (Spanish):Changing to English:1. Update the AI Prompt:2. Update Month Names:3. Update Template:Other Languages:French:Portuguese:Multilingual Stories:
Randomly alternate between languages:
Some AI models perform better in English. If you experience quality issues, try a model specifically trained for your target language.
Technical Questions
How does the update mechanism work?
How does the update mechanism work?
The system uses a smart update mechanism to avoid duplicate entries for the same day.File Naming:Update Logic:Behavior:
- First run of the day: Creates new entry in
historial.json - Subsequent runs same day: Updates the title in the existing entry
- HTML files: Always overwritten with the latest content
- Menu order: New stories appear at the top (
insert(0, ...))
- Run the workflow multiple times per day
- Regenerate stories if you’re not happy with the first result
- Fix issues without creating duplicates
Why does the workflow use git diff --quiet?
Why does the workflow use git diff --quiet?
This prevents empty commits when no changes were made.The Command:How It Works:
git diff --quiet- Returns 0 if no unstaged changes, 1 if changes existgit diff --staged --quiet- Checks for staged changes&&- “And” operator (continues if previous succeeded)||- “Or” operator (runs if previous failed)
- Check if there are no unstaged changes AND no staged changes
- If both are empty (no changes), the condition is true → skip commit
- If there are changes, the condition is false → make commit
- Prevents cluttering git history with empty commits
- Workflow doesn’t fail if run multiple times without changes
- Useful for testing workflow configuration
Can I add more metadata to stories?
Can I add more metadata to stories?
Yes! You can extend the system to track additional metadata.Current Metadata:Extended Metadata Example:Extracting Genre from AI:
Update the prompt:Using Metadata in Template:Display in HTML:
Still Have Questions?
If your question isn’t answered here:- Check the Troubleshooting page for technical issues
- Review the Core Concepts for system architecture
- Examine the source code directly - it’s only ~100 lines!
- Check GitHub Actions logs for specific error messages
The beauty of this project is its simplicity. The entire system is contained in three main files:
generar_historia.py, actualizar.yml, and plantilla.html. You can customize any aspect by editing these files!