Skip to content

lylo/pagecord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pagecord

Publish your writing effortlessly. All you need is email.

https://pagecord.com

Development

Quick Start with Docker

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 up

This 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.

Running commands in Docker

# 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"

Native Development (Alternative)

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/dev

Run tests:

bin/rails test
bin/rails test:system

Processing an email locally

Sometimes 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:load

Open Graph Images

Pagecord 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-key

More info

Read about the Pagecord architecture or making contributions.

Follow the Pagecord blog.

Buy Me A Coffee

About

Blogging as easy as sending an email.

Topics

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE-SUMMARY.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •