Skip to content

Commit a7d030e

Browse files
authored
Merge pull request #271 from adiati98/chores/build-docs
Add `build-docs` file to add `ddev build-docs` command
2 parents 1513f1a + 8d764e0 commit a7d030e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.ddev/commands/web/build-docs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
## Description: Build User documentation using the Sphinx HTML builder.
4+
## Usage: build-docs
5+
## Example: ddev build-docs
6+
7+
# Ensure we fail on error
8+
set -e
9+
10+
# Initialize terminal colors/styles
11+
bold=$(tput bold)
12+
green=$(tput setaf 2)
13+
reset=$(tput sgr0)
14+
underline=$(tput smul)
15+
16+
echo "${bold}${green}🔧 Building user documentation...${reset}"
17+
18+
# Ensure we're in the right directory
19+
cd /var/www/html/docs
20+
echo
21+
22+
# Run the build
23+
make html
24+
25+
# Success message
26+
echo
27+
echo "${green}✅ Documentation build completed successfully!${reset}"
28+
echo "${green}📁 The HTML pages are in: ${bold}/var/www/html/docs/build/html${reset}"
29+
30+
# Friendly access hint
31+
echo "${green}🌐 View the documentation at: ${bold}${underline}https://${DDEV_HOSTNAME}${reset}"
32+
echo

0 commit comments

Comments
 (0)