Skip to content

Commit

Permalink
make: mkdocs and python virtual environment tasks
Browse files Browse the repository at this point in the history
MKDOC_SERVER makefile variable defining command to start mkdocs locally

Update mkdocs tasks to use python virtual environment
  • Loading branch information
practicalli-johnny committed Nov 22, 2024
1 parent fcc1c39 commit 93196ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- make: `git-sr` and `git-status` to check status of all repositories
- os: hyprland configuration files
- kitty: example transparent_background options for linux
- make: mkdocs and python virtual environment tasks

### Changed
- git: restructure multiple configs, using relative include file paths
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ HELP-DESCRIPTION-SPACING := 24
# Tool variables
# MEGALINTER_RUNNER := npx mega-linter-runner --flavor documentation --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --remove-container
MEGALINTER_RUNNER := npx mega-linter-runner --flavor java --env "'MEGALINTER_CONFIG=.github/config/megalinter.yaml'" --remove-container

MKDOCS_SERVER := mkdocs serve --dev-addr localhost:7777
# -------------------------------------- #

# -- Help ------------------------------ #
Expand Down Expand Up @@ -181,10 +183,22 @@ git-status: ## status details of git repos under current directory
mgitstatus
# -------------------------------------- #

# -- Documentation Generation ---------- #
docs: ## Run mkdocs server
$(info -- Mkdocs Local Server -------------------)
mkdocs serve --dev-addr localhost:7777
# --- Documentation Generation -------- #
python-venv: ## Enable Python Virtual Environment for MkDocs
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate

docs: python-venv ## Build and run mkdocs in local server (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER)

docs-changed: python-venv ## Build only changed files and run mkdocs in local server (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && $(MKDOCS_SERVER) --dirtyreload

docs-build: python-venv ## Build mkdocs (python venv)
$(info -- Mkdocs Local Server -----------------)
source ~/.local/venv/bin/activate && mkdocs build
# -------------------------------------- #

# ------- Docker Containers ------------ #
Expand Down

0 comments on commit 93196ec

Please sign in to comment.