Skip to content

Commit

Permalink
Added mkdocs command to allow run mkdocs without exec.
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Aug 20, 2024
1 parent 53e3592 commit 2301553
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions commands/mkdocs/mkdocs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

#ddev-generated

## Description: Run mkdocs commands
## Usage: mkdocs [args]
## Example: "ddev mkdocs build"
## ExecRaw: true

if [ "$1" == "serve" ]; then
echo "This does not work for mkdocs in ddev"
exit 1
fi

mkdocs "${@:1}"
4 changes: 3 additions & 1 deletion docker-compose.mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
- HTTPS_EXPOSE=9005:8080
volumes:
- $DDEV_APPROOT/docs:/docs
- .:/mnt/ddev_config:ro
- ddev-global-cache:/mnt/ddev-global-cache
user: '$DDEV_UID:$DDEV_GID'
working_dir: /docs
labels:
Expand All @@ -17,7 +19,7 @@ services:
networks:
ddev_default: null
default: null
expose:
expose:
- "8080"
web:
links:
Expand Down
1 change: 1 addition & 0 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: mkdocs
project_files:
- docker-compose.mkdocs.yaml
- docs
- commands

post_install_actions:
- test -d ${DDEV_APPROOT}/docs || mkdir -p ${DDEV_APPROOT}/docs
Expand Down

0 comments on commit 2301553

Please sign in to comment.