Automatically generate beautiful LinkedIn post cards and display them in your GitHub profile README. The cards update daily with your latest posts.
- 🎨 Automatic card generation from LinkedIn posts
- 🌓 Light and dark theme support
- 🔄 Daily automatic updates via GitHub Actions
- 🌍 Multi-language support (English, Spanish, French, German...) Feel free to create a pull request adding yours.
- 📱 Responsive SVG cards
- 🚀 Easy setup - just add to your workflow!
In your profile README (or any README where you want to display the cards), add these markers:
<!-- BEGIN LINKEDIN-CARDS -->
<!-- END LINKEDIN-CARDS -->Create .github/workflows/linkedin-cards.yml in your repository:
name: LinkedIn Cards
on:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight
workflow_dispatch:
permissions:
contents: write
jobs:
linkedin-cards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: alexcerezo/linkedin-cards@main
with:
apify_api_token: ${{ secrets.APIFY_API_TOKEN }}
linkedin_username: ${{ vars.LINKEDIN_USERNAME }}
max_cards_to_generate: 4
language: en
include_reposts: 'true'Create a Secret:
Go to Settings → Secrets and variables → Actions → Secrets:
| Name | Description | How to get |
|---|---|---|
APIFY_API_TOKEN |
Your Apify API token | Create free account at apify.com → Settings → API tokens |
Create a Variable:
Go to Settings → Secrets and variables → Actions → Variables:
| Name | Description | Example |
|---|---|---|
LINKEDIN_USERNAME |
Your LinkedIn username | johndoe (from linkedin.com/in/johndoe) |
Go to Actions tab → LinkedIn Cards → Run workflow
That's it! Your README will automatically update with your latest LinkedIn posts. 🎉
If you want to customize templates or contribute to the project:
git clone https://github.com/alexcerezo/linkedin-cards.git
cd linkedin-cardsSame as Quick Setup above.
<!-- BEGIN LINKEDIN-CARDS -->
<!-- END LINKEDIN-CARDS -->The included workflow runs automatically. You can also trigger it manually from the Actions tab.
| Input | Description | Required | Default |
|---|---|---|---|
apify_api_token |
Apify API token | ✅ Yes | - |
linkedin_username |
Your LinkedIn username | ✅ Yes | - |
max_cards_to_generate |
Max number of cards | ❌ No | 4 |
language |
Card language | ❌ No | en |
include_reposts |
Include reposts (quote or simple) | ❌ No | false |
comment_tag_name |
Comment tag for README injection | ❌ No | LINKEDIN-CARDS |
en- Englishes- Spanishfr- Frenchde- German
Install dependencies:
npm installCreate a .env file:
# Secret - Keep this private!
APIFY_API_TOKEN=your_apify_api_token_here
# Variables - Can be public
LINKEDIN_USERNAME=alexcerezocontreras
MAX_CARDS_TO_GENERATE=25
LANGUAGE=es # Options: en, es, fr, de
INCLUDE_REPOSTS=true # Set to 'true' to include reposts
# Development/Testing
USE_MOCK_DATA=true # Set to 'true' to use mock data instead of calling the API (saves costs during development)Run the generator:
node scripts/auto-generate.jsWant to add support for your language? Create a json into the lang folder and add your translations:
{ // Portuguese example
'second': 'segundo',
'seconds': 'segundos',
'minute': 'minuto',
'minutes': 'minutos',
'hour': 'hora',
'hours': 'horas',
'day': 'dia',
'days': 'dias',
'week': 'semana',
'weeks': 'semanas',
'month': 'mês',
'months': 'meses',
'year': 'ano',
'years': 'anos',
'ago': 'Há',
'comments': 'comentários',
invertOrder: true
}Set invertOrder: true if your language places "ago" at the beginning (like Spanish: "Hace 3 semanas").
Pull requests are welcome! 🌍
- The GitHub Action runs on a schedule (daily by default)
- Fetches your latest LinkedIn posts via Apify
- Generates SVG cards for your most recent posts
- Updates your README with the new cards
- Commits and pushes the changes to your repository
The action regenerates cards each time it runs, always showing your latest posts.
Templates are located in templates/. Edit these files to customize the card appearance.
Change MAX_CARDS_TO_GENERATE variable to control how many cards are displayed (recommended: 4-6).
See this README for a live example of generated cards.
MIT License - feel free to use and modify.
Created by Alejandro Cerezo