diff --git a/README.md b/README.md index 59528fd..7e3e73e 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,40 @@ NoteDiscovery is a **lightweight, self-hosted note-taking application** that put Use the pre-built image directly from GHCR - no building required! +> **📁 Important - Volume Mapping**: The container needs local folders/files to work: +> - **Required**: `data` folder (your notes will be stored here) +> - **Required**: `themes` folder with theme `.css` files (at least light.css and dark.css) +> - **Required**: `plugins` folder (can be empty for basic functionality) +> - **Required**: `config.yaml` file (needed for the app to run) +> +> **Setup Options:** +> +> 1. **Minimal** (quick test - download just the essentials): +> ```bash +> # Linux/macOS +> mkdir -p data plugins themes +> curl -O https://raw.githubusercontent.com/gamosoft/notediscovery/main/config.yaml +> # Download at least light and dark themes +> curl -o themes/light.css https://raw.githubusercontent.com/gamosoft/notediscovery/main/themes/light.css +> curl -o themes/dark.css https://raw.githubusercontent.com/gamosoft/notediscovery/main/themes/dark.css +> ``` +> +> ```powershell +> # Windows PowerShell +> mkdir data, plugins, themes -Force +> Invoke-WebRequest -Uri https://raw.githubusercontent.com/gamosoft/notediscovery/main/config.yaml -OutFile config.yaml +> # Download at least light and dark themes +> Invoke-WebRequest -Uri https://raw.githubusercontent.com/gamosoft/notediscovery/main/themes/light.css -OutFile themes/light.css +> Invoke-WebRequest -Uri https://raw.githubusercontent.com/gamosoft/notediscovery/main/themes/dark.css -OutFile themes/dark.css +> ``` +> +> 2. **Full Setup** (recommended - includes all themes, plugins, sample notes): +> ```bash +> git clone https://github.com/gamosoft/notediscovery.git +> cd notediscovery +> # Now you have everything - run docker-compose below +> ``` + **Option 1: Docker Compose (Recommended)** ```bash diff --git a/backend/themes.py b/backend/themes.py index 59af779..cdcf150 100644 --- a/backend/themes.py +++ b/backend/themes.py @@ -24,21 +24,9 @@ def get_available_themes(themes_dir: str) -> List[Dict[str, str]]: "vs-blue": "🔷" } - # Built-in themes - default_themes = [ - {"id": "light", "name": f"{theme_icons.get('light', '')} Light", "builtin": True}, - {"id": "dark", "name": f"{theme_icons.get('dark', '')} Dark", "builtin": True}, - ] - - themes.extend(default_themes) - - # Custom themes + # Load all themes from themes folder if themes_path.exists(): for theme_file in themes_path.glob("*.css"): - # Skip built-in themes - if theme_file.stem in ["light", "dark"]: - continue - theme_name = theme_file.stem.replace("-", " ").replace("_", " ").title() icon = theme_icons.get(theme_file.stem, "🎨") diff --git a/docker-compose.ghcr.yml b/docker-compose.ghcr.yml index 507e87c..de5bcc7 100644 --- a/docker-compose.ghcr.yml +++ b/docker-compose.ghcr.yml @@ -9,9 +9,9 @@ services: - ./data:/app/data # Custom plugins - ./plugins:/app/plugins - # Custom themes + # Custom themes (REQUIRED - must contain theme .css files) - ./themes:/app/themes - # Custom config (optional) + # Config file (REQUIRED - must exist as a file, not directory!) - ./config.yaml:/app/config.yaml restart: unless-stopped environment: diff --git a/docker-compose.yml b/docker-compose.yml index 8e16a56..5d7f5cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,9 +9,9 @@ services: - ./data:/app/data # Custom plugins - ./plugins:/app/plugins - # Custom themes + # Custom themes (REQUIRED - must contain theme .css files) - ./themes:/app/themes - # Custom config (optional) + # Config file (REQUIRED - must exist as a file, not directory!) - ./config.yaml:/app/config.yaml restart: unless-stopped environment: