diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 89e6b2fa4..b1d6d7b41 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -199,7 +199,7 @@ { "label": "Build and watch Docs", "type": "shell", - "command": "docker compose build && docker compose up", + "command": "docker compose -f docker-compose.dev.yml build && docker compose -f docker-compose.dev.yml up", "problemMatcher": [], "group": { "kind": "build", diff --git a/docs/_config.production.yml b/docs/_config.production.yml new file mode 100644 index 000000000..da03f0f89 --- /dev/null +++ b/docs/_config.production.yml @@ -0,0 +1,13 @@ +# Production overrides to disable GitHub metadata +plugins: + - jekyll-sitemap + - jekyll-redirect-from + +# Explicitly set repository to avoid GitHub API calls +repository: aliasvault/aliasvault + +# Set baseurl explicitly to avoid GitHub Pages detection +baseurl: "" + +# Disable GitHub metadata +github: [metadata] \ No newline at end of file diff --git a/docs/docker-compose.dev.yml b/docs/docker-compose.dev.yml new file mode 100644 index 000000000..8e2691e1a --- /dev/null +++ b/docs/docker-compose.dev.yml @@ -0,0 +1,22 @@ +# Docker Compose file for the AliasVault documentation +# +# This file is used to build the AliasVault documentation and serve it locally in development mode +# with livereload enabled. +# +# Usage: +# docker-compose up -d +# docker-compose down +# +services: + jekyll: + build: + context: . + volumes: + - .:/srv/jekyll + ports: + - "4000:4000" + command: bundle exec jekyll serve --host 0.0.0.0 --watch --force_polling --livereload + environment: + - JEKYLL_ENV=development + - JEKYLL_NO_CACHE=true + - DISABLE_DISK_CACHE=true diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml index cac34e88f..a1fcf5097 100644 --- a/docs/docker-compose.yml +++ b/docs/docker-compose.yml @@ -1,12 +1,31 @@ +# Docker Compose file for the AliasVault documentation +# +# This file is used to build the AliasVault documentation and serve it locally in production mode +# with caching and without livereload. +# +# Usage: +# docker-compose up -d +# docker-compose down +# services: - jekyll: - build: . - volumes: - - .:/srv/jekyll - ports: - - "4000:4000" - command: bundle exec jekyll serve --host 0.0.0.0 --watch --force_polling --livereload - environment: - - JEKYLL_ENV=development - - JEKYLL_NO_CACHE=true - - DISABLE_DISK_CACHE=true + jekyll: + build: + context: . + ports: + - "4000:4000" + command: bundle exec jekyll serve --host 0.0.0.0 --no-watch --config _config.yml,_config.production.yml + environment: + - JEKYLL_ENV=production + - JEKYLL_NO_CACHE=false + - DISABLE_DISK_CACHE=false + - JEKYLL_GITHUB_TOKEN= + - PAGES_REPO_NWO=aliasvault/aliasvault + - NO_GITHUB=true + volumes: + - .:/srv/jekyll + - jekyll_cache:/srv/jekyll/.jekyll-cache + - jekyll_site:/srv/jekyll/_site + +volumes: + jekyll_cache: + jekyll_site: