v0.1.3 로컬 고스트 개발 환경 구성

This commit is contained in:
2026-04-13 11:36:12 +09:00
parent fab60c0c89
commit a9d07dcfdc
6 changed files with 59 additions and 3 deletions

4
.gitignore vendored
View File

@@ -1,5 +1,9 @@
.DS_Store
.cursor/
.vscode/
AGENTS.md
docs/
theme-export/
*.zip
local-ghost/
.docker/

View File

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

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="ffffff"><path d="m256-240-56-56 384-384H240v-80h480v480h-80v-344L256-240Z"/></svg>

After

Width:  |  Height:  |  Size: 180 B

13
docker-compose.yml Normal file
View File

@@ -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

View File

@@ -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'"
}
}

25
scripts/sync-theme.sh Executable file
View File

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