v0.1.3 로컬 고스트 개발 환경 구성
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,9 @@
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
.cursor/
|
||||||
|
.vscode/
|
||||||
AGENTS.md
|
AGENTS.md
|
||||||
docs/
|
docs/
|
||||||
theme-export/
|
theme-export/
|
||||||
*.zip
|
*.zip
|
||||||
|
local-ghost/
|
||||||
|
.docker/
|
||||||
|
|||||||
@@ -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`.
|
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.
|
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
|
## 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.
|
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.
|
||||||
|
|||||||
1
assets/icons/arrow_outward.svg
Normal file
1
assets/icons/arrow_outward.svg
Normal 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
13
docker-compose.yml
Normal 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
|
||||||
10
package.json
10
package.json
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-theme-thred-clone",
|
"name": "ghost-theme-thred-clone",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "A Ghost theme inspired by the Thred reference layout.",
|
"description": "A Ghost theme inspired by the Thred reference layout.",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "OpenAI Codex",
|
"name": "zenn",
|
||||||
"email": "support@openai.com"
|
"email": "zenn.message@gmail.com"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"ghost-api": "v5"
|
"ghost-api": "v5"
|
||||||
@@ -68,6 +68,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"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'"
|
"zip": "zip -r theme.zip . -x '*.git*' -x 'node_modules/*' -x 'theme.zip'"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
25
scripts/sync-theme.sh
Executable file
25
scripts/sync-theme.sh
Executable 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"
|
||||||
Reference in New Issue
Block a user