Publish your writing effortlessly. All you need is email.
The easiest way to get Pagecord running locally is with Docker.
First, install Docker Desktop and make sure it's running.
Then:
git clone https://github.com/lylo/pagecord.git
cd pagecord
docker-compose upThis will:
- Start PostgreSQL, Redis, and Memcached containers
- Build and run the Rails app
- Set up the database automatically
You can view the app at http://localhost:3000. It's configured to use lvh.me, so you can view individual blogs on their respective subdomains, e.g. http://joel.lvh.me:3000.
# Rails console
docker-compose exec web bin/rails console
# Run tests
docker-compose exec web bin/rails test
docker-compose exec web bin/rails test:system
# Run migrations
docker-compose exec web bin/rails db:migrate
# Process emails (debug)
docker-compose exec web bash -c "DIR=tmp/emails rake email:load"If you prefer to run Rails natively without Docker:
Click to expand native setup instructions
Install Ruby 3.4.5+ using HomeBrew and rbenv.
bundle install
rails db:setup
brew install redis postgresql
bin/devRun tests:
bin/rails test
bin/rails test:systemSometimes you'll need to debug emails. To do this, save the .eml file(s) to a folder
such as tmp/emails.
You can then run the following command which will parse all the .eml files in that
folder and create posts for the first user account in the seed data ([email protected]).
DIR=tmp/emails rake email:loadPagecord can optionally generate dynamic Open Graph images for blog posts using a separate Cloudflare Worker service. This worker is currently closed source and not required to run Pagecord locally.
What it does: Generates social media preview images for posts without explicit OG images.
Local development: Pagecord gracefully falls back to standard behavior when the worker is not configured. Your local installation will work perfectly fine without it - posts will simply use their first image or no OG image, just like they did originally.
If you're interested in setting up your own OG image worker, you can configure it with these optional environment variables:
OG_WORKER_URL=https://your-worker-url.com/og
OG_SIGNING_SECRET=your-secret-keyRead about the Pagecord architecture or making contributions.
Follow the Pagecord blog.
