{ "workspace": { "rootDir": ".", "description": "ShowerLoop-cc website - Open source shower water recycling project", "policyNotes": [ "Avoid adding new files to the repository unless absolutely necessary", "Use CSP hash calculators for security policy updates", "Always git pull before starting work" ] }, "editor": { "formatOnSave": true, "tabSize": 2, "insertSpaces": true, "defaultLanguage": "html", "rulers": [120] }, "terminal": { "defaultShell": "/bin/zsh", "defaultWorkingDirectory": "docker/showerloop" }, "shortcuts": { "runHugo": "cd docker/showerloop/public && hugo server --disableFastRender --minify --gc --navigateToChanged -D --bind '0.0.0.0' --baseURL 'http://localhost:1313/'", "gitCommitPush": "git add . && git commit -m \"Updates and improvements\" && git push", "startSession": "git pull", "cspHashes": "node collect-all-csp-hashes.js ./docker/showerloop/public" }, "tools": { "cspTools": [ { "name": "Calculate single hash", "command": "node csp-hash-calculator.js \"SCRIPT_OR_STYLE_CONTENT\"", "description": "Calculate CSP hash for a specific script or style" }, { "name": "Extract hashes from file", "command": "node extract-and-hash-csp.js ./docker/showerloop/public/PATH_TO_HTML", "description": "Extract and hash scripts/styles from a specific HTML file" }, { "name": "Collect all hashes", "command": "node collect-all-csp-hashes.js ./docker/showerloop/public", "description": "Collect all CSP hashes from the project" } ] }, "git": { "commitMessageTemplate": "Update: {message}", "defaultCommitCommand": "git add . && git commit -m \"{message}\" && git push", "alwaysPullFirst": true }, "snippets": { "CSP Update": { "prefix": "csp-update", "body": [ "Content-Security-Policy \"default-src 'self'; script-src 'self' blob: ${1:script-hashes}; style-src 'self' ${2:style-hashes}; img-src 'self' data: blob:; media-src 'self' blob:; font-src 'self' data:; connect-src 'self'; frame-ancestors 'none'; worker-src 'self' blob:\"" ], "description": "Update CSP with new hashes" }, "Hugo Server": { "prefix": "hugo-server", "body": [ "hugo server --disableFastRender --minify --gc --navigateToChanged -D --bind \"0.0.0.0\" --baseURL \"http://localhost:1313/\"" ], "description": "Start Hugo development server" } }, "files": { "important": [ "docker/showerloop/Caddyfile.default.template", "docker/showerloop/public/index.html", "stack.production.yml", "collect-all-csp-hashes.js" ], "ignore": [ "**/.DS_Store", "node_modules", "public/resources", ".hugo_build.lock" ] } }