diff --git a/.gitignore b/.gitignore index ec2d8ee..039bee1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,9 @@ .DS_Store +.cursor/ +.vscode/ AGENTS.md docs/ theme-export/ *.zip +local-ghost/ +.docker/ diff --git a/README.md b/README.md index 306cfd7..fc7774c 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,15 @@ This repository contains a Ghost theme scaffold inspired by the `Thred` referenc 2. Upload the zip in Ghost Admin under `Settings -> Design -> Change theme`. 3. Configure navigation, tags, authors, site icon, and custom footer links in Ghost Admin. +## Local development + +1. Run `npm run dev:ghost:start` +2. Open `http://localhost:2368/ghost` and complete the local Ghost setup +3. Activate the `ghost-theme-thred-clone` theme in `Settings -> Design` +4. After theme changes, run `npm run dev:ghost:restart` + +The local Docker setup syncs only theme-related files into `.docker/theme/ghost-theme-thred-clone`, so work files such as `docs/` or `local-ghost/` do not slow down Ghost startup. + ## Important note The layout closely follows the provided reference, but Ghost content, membership, comments, and recommendation data depend on the site configuration and content model inside your Ghost installation. diff --git a/assets/icons/arrow_outward.svg b/assets/icons/arrow_outward.svg new file mode 100644 index 0000000..6cd0d2d --- /dev/null +++ b/assets/icons/arrow_outward.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ea7228e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +services: + ghost: + image: ghost:6-alpine + container_name: ghost-theme-local + restart: unless-stopped + ports: + - "2368:2368" + environment: + url: http://localhost:2368 + NODE_ENV: development + volumes: + - ./.docker/ghost/content:/var/lib/ghost/content + - ./.docker/theme/ghost-theme-thred-clone:/var/lib/ghost/content/themes/ghost-theme-thred-clone diff --git a/package.json b/package.json index 6a2febd..f7b9183 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "ghost-theme-thred-clone", - "version": "0.1.2", + "version": "0.1.3", "private": true, "description": "A Ghost theme inspired by the Thred reference layout.", "author": { - "name": "OpenAI Codex", - "email": "support@openai.com" + "name": "zenn", + "email": "zenn.message@gmail.com" }, "engines": { "ghost-api": "v5" @@ -68,6 +68,10 @@ } }, "scripts": { + "dev:sync": "sh ./scripts/sync-theme.sh", + "dev:ghost:start": "npm run dev:sync && docker compose up -d", + "dev:ghost:restart": "npm run dev:sync && docker compose restart ghost", + "dev:ghost:stop": "docker compose down", "zip": "zip -r theme.zip . -x '*.git*' -x 'node_modules/*' -x 'theme.zip'" } } diff --git a/scripts/sync-theme.sh b/scripts/sync-theme.sh new file mode 100755 index 0000000..beb0b32 --- /dev/null +++ b/scripts/sync-theme.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -eu + +ROOT_DIR="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)" +TARGET_DIR="$ROOT_DIR/.docker/theme/ghost-theme-thred-clone" + +mkdir -p "$TARGET_DIR" + +rsync -a --delete \ + --exclude='.git/' \ + --exclude='.cursor/' \ + --exclude='.vscode/' \ + --exclude='.docker/' \ + --exclude='docs/' \ + --exclude='local-ghost/' \ + --exclude='theme-export/' \ + --exclude='scripts/' \ + --exclude='*.zip' \ + --exclude='AGENTS.md' \ + --exclude='.DS_Store' \ + --exclude='.gitignore' \ + "$ROOT_DIR/" "$TARGET_DIR/" + +printf 'Synced theme files to %s\n' "$TARGET_DIR"