update Makefile add watch static, locale, redirects

This commit is contained in:
hoangvv 2025-02-25 11:55:56 +07:00
parent 060548df53
commit 8135ed831d
2 changed files with 40512 additions and 2 deletions

View File

@ -26,6 +26,9 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
-j $(WORKERS) -j $(WORKERS)
SOURCE_DIR = content SOURCE_DIR = content
THEME = extensions/odoo_theme THEME = extensions/odoo_theme
LOCALE = locale
STATIC = static
REDIRECTS = redirects
SERVER_IP := $(shell ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') SERVER_IP := $(shell ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
# Get all listening ports # Get all listening ports
LISTENING_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq) LISTENING_PORTS := $(shell ss -tuln | awk 'NR>1 {print $$4}' | awk -F: '{print $$NF}' | sort -n | uniq)
@ -67,10 +70,12 @@ livehtml: SPHINXOPTS += -A collapse_menu=True
livehtml: livehtml:
@echo "Starting Live Server..." @echo "Starting Live Server..."
$(SPHINX_AUTO_BUILD) $(SOURCE_DIR) $(HTML_BUILD_DIR) \ $(SPHINX_AUTO_BUILD) $(SOURCE_DIR) $(HTML_BUILD_DIR) \
--port 8000 --host $(SERVER_IP) --watch $(THEME) \ --port 8000 --host $(SERVER_IP) \
--pre-build "python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css" \ --watch $(THEME) --watch $(LOCALE) --watch $(STATIC) --watch $(REDIRECTS) \
--pre-build "sh -c 'mkdir -p $(HTML_BUILD_DIR)/_static && python3 -m pysassc $(THEME)/static/style.scss $(HTML_BUILD_DIR)/_static/style.css'" \
$(SPHINXOPTS) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) -c $(CONFIG_DIR) -b html
# To call *after* `make html` # To call *after* `make html`
# Binary dependencies (Debian): texlive-fonts-recommended texlive-latex-extra # Binary dependencies (Debian): texlive-fonts-recommended texlive-latex-extra
# texlive-fonts-extra # texlive-fonts-extra

File diff suppressed because it is too large Load Diff