Skip to content

Commit aa01899

Browse files
committed
initial commit
0 parents  commit aa01899

File tree

9 files changed

+1461
-0
lines changed

9 files changed

+1461
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to Cloudflare Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
deployments: write
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Build Docker image
24+
run: docker compose build build
25+
26+
- name: Build static site
27+
run: docker compose run --rm build
28+
29+
- name: Deploy to Cloudflare Pages
30+
uses: cloudflare/wrangler-action@v3
31+
with:
32+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
33+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
34+
command: pages deploy site --project-name=sexp-ed
35+

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Generated site output
2+
site/
3+
4+
# Editor files
5+
*~
6+
\#*\#
7+
.#*
8+
9+
# OS files
10+
.DS_Store
11+
Thumbs.db

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM debian:bookworm-slim
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends \
5+
guile-3.0 \
6+
guile-3.0-dev \
7+
make \
8+
gcc \
9+
curl \
10+
ca-certificates \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
# Install Haunt from source (not in Debian repos)
14+
RUN curl -L https://files.dthompson.us/haunt/haunt-0.3.0.tar.gz -o /tmp/haunt.tar.gz && \
15+
cd /tmp && \
16+
tar xzf haunt.tar.gz && \
17+
cd haunt-0.3.0 && \
18+
./configure --prefix=/usr && \
19+
make && \
20+
make install && \
21+
rm -rf /tmp/haunt*
22+
23+
WORKDIR /site
24+
25+
# Default command is to build the site
26+
CMD ["haunt", "build"]

README.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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

Comments
 (0)