|
| 1 | +# sexp-ed |
| 2 | + |
| 3 | +A curated collection of resources to learn Lisp and its many dialects. |
| 4 | + |
| 5 | +**Live site:** [sexp-ed.com](https://sexp-ed.com) |
| 6 | + |
| 7 | +## About |
| 8 | + |
| 9 | +sexp-ed is a single-page static website listing learning resources for: |
| 10 | + |
| 11 | +- **Common Lisp** - The industrial-strength Lisp |
| 12 | +- **Scheme** - The minimalist, elegant Lisp |
| 13 | +- **Racket** - The language-oriented programming language |
| 14 | +- **Clojure** - Modern Lisp for the JVM |
| 15 | +- **Emacs Lisp** - Power your editor with Lisp |
| 16 | +- **Janet** - Lightweight, embeddable Lisp |
| 17 | +- And more: Fennel, Hy, LFE, Carp, Arc, Bel... |
| 18 | + |
| 19 | +## Tech Stack |
| 20 | + |
| 21 | +- **[Haunt](https://dthompson.us/projects/haunt.html)** - Static site generator written in Guile Scheme |
| 22 | +- **SXML** - HTML templates using S-expressions (very Lispy!) |
| 23 | +- **Docker** - Containerized build environment |
| 24 | + |
| 25 | +## Development |
| 26 | + |
| 27 | +### Prerequisites |
| 28 | + |
| 29 | +Docker and Docker Compose are required. No need to install Guile or Haunt locally. |
| 30 | + |
| 31 | +### Build the site |
| 32 | + |
| 33 | +```bash |
| 34 | +docker compose run --rm build |
| 35 | +``` |
| 36 | + |
| 37 | +This generates the static site in the `site/` directory. |
| 38 | + |
| 39 | +### Serve locally |
| 40 | + |
| 41 | +```bash |
| 42 | +docker compose up serve |
| 43 | +``` |
| 44 | + |
| 45 | +Visit [http://localhost:8080](http://localhost:8080) to preview the site. |
| 46 | + |
| 47 | +### Without Docker |
| 48 | + |
| 49 | +If you have Guile and Haunt installed locally: |
| 50 | + |
| 51 | +```bash |
| 52 | +# Build |
| 53 | +haunt build |
| 54 | + |
| 55 | +# Serve |
| 56 | +haunt serve |
| 57 | +``` |
| 58 | + |
| 59 | +## Project Structure |
| 60 | + |
| 61 | +``` |
| 62 | +sexp-ed/ |
| 63 | +├── haunt.scm # Site configuration |
| 64 | +├── Dockerfile # Build environment |
| 65 | +├── docker-compose.yml # Build/serve commands |
| 66 | +├── assets/ |
| 67 | +│ └── css/ |
| 68 | +│ └── style.css # Playful, parentheses-inspired design |
| 69 | +├── templates/ |
| 70 | +│ └── base.scm # HTML template (navigation, footer) |
| 71 | +├── pages/ |
| 72 | +│ └── index.scm # All content and resources |
| 73 | +└── site/ # Generated output (gitignored) |
| 74 | +``` |
| 75 | + |
| 76 | +## Deployment |
| 77 | + |
| 78 | +The site automatically deploys to Cloudflare Pages when you push to `main`. |
| 79 | + |
| 80 | +### Setup (one-time) |
| 81 | + |
| 82 | +1. Create a Cloudflare Pages project named `sexp-ed` |
| 83 | +2. In your GitHub repo, add these secrets (Settings → Secrets → Actions): |
| 84 | + - `CLOUDFLARE_API_TOKEN` - Create at [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens) with "Cloudflare Pages: Edit" permission |
| 85 | + - `CLOUDFLARE_ACCOUNT_ID` - Found in your Cloudflare dashboard URL or account settings |
| 86 | + |
| 87 | +3. (Optional) Add custom domain `sexp-ed.com` in Cloudflare Pages settings |
| 88 | + |
| 89 | +### Manual deploy |
| 90 | + |
| 91 | +You can also trigger a deploy manually from the Actions tab using "Run workflow". |
| 92 | + |
| 93 | +## Contributing |
| 94 | + |
| 95 | +Contributions welcome! To add a resource: |
| 96 | + |
| 97 | +1. Edit `pages/index.scm` |
| 98 | +2. Add a `resource-card` to the appropriate section |
| 99 | +3. Test locally with `docker compose up serve` |
| 100 | +4. Submit a pull request |
| 101 | + |
| 102 | +## License |
| 103 | + |
| 104 | +Content is available under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). |
| 105 | +Code is available under the [MIT License](LICENSE). |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +*Made with ♥ and lots of parentheses* |
| 110 | + |
0 commit comments