-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refactory' of https://github.com/ostefano/misp-modules …
…into ostefano-refactory
- Loading branch information
Showing
35 changed files
with
6,539 additions
and
4,981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,4 @@ venv* | |
.vscode* | ||
*.sqlite | ||
website/conf/config.cfg | ||
wheels |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,61 @@ | ||
# https://www.mkdocs.org/user-guide/deploying-your-docs/ | ||
# See: https://www.mkdocs.org/user-guide/deploying-your-docs/ | ||
# Running 'make' uses poetry-installed mkdocs | ||
# Running 'USE_DOCKER=true make' uses docker mkdocs | ||
|
||
.PHONY: prepare_docs generate_docs ci_generate_docs test_docs | ||
.PHONY: prepare_docs generate_docs deploy test_docs | ||
|
||
prepare_docs: | ||
pip3 install . | ||
cd documentation; python3 generate_documentation.py | ||
mkdir -p docs/expansion/logos docs/export_mod/logos docs/import_mod/logos | ||
mkdir -p docs/logos | ||
cd documentation; cp -R ./logos/* ../docs/logos | ||
cd documentation; cp -R ./logos/* ../docs/expansion/logos | ||
cd documentation; cp -R ./logos/* ../docs/export_mod/logos | ||
cd documentation; cp -R ./logos/* ../docs/import_mod/logos | ||
cp ./documentation/mkdocs/*.md ./docs | ||
cp LICENSE ./docs/license.md | ||
|
||
install_requirements: | ||
pip install -r docs/REQUIREMENTS.txt | ||
MKDOCS_DOCKER_IMAGE := squidfunk/mkdocs-material | ||
|
||
generate_docs: prepare_docs | ||
mkdocs build | ||
DOCS_DIST_DIR := ./docs | ||
|
||
deploy: | ||
mkdocs gh-deploy | ||
DOCS_SRC_DIR := ./documentation | ||
|
||
test_docs: prepare_docs | ||
mkdocs serve | ||
USE_DOCKER ?= | ||
|
||
.DEFAULT_GOAL := generate_docs | ||
|
||
# DOCKER make commands | ||
generate_docs_docker: prepare_docs | ||
docker run --rm -it -v $(PWD):/docs squidfunk/mkdocs-material build | ||
|
||
deploy_docker: | ||
docker run --rm -it -v $(PWD):/docs -v /home/$(whoami)/.docker:/root/.docker:ro squidfunk/mkdocs-material gh-deploy | ||
prepare_docs: | ||
@echo "Preparing documentation." | ||
poetry install --only docs | ||
poetry run python $(DOCS_SRC_DIR)/generate_documentation.py | ||
mkdir -p $(DOCS_DIST_DIR)/logos | ||
mkdir -p $(DOCS_DIST_DIR)/expansion/logos | ||
mkdir -p $(DOCS_DIST_DIR)/export_mod/logos | ||
mkdir -p $(DOCS_DIST_DIR)/import_mod/logos | ||
cp -R $(DOCS_SRC_DIR)/logos/* $(DOCS_DIST_DIR)/logos | ||
cp -R $(DOCS_SRC_DIR)/logos/* $(DOCS_DIST_DIR)/expansion/logos | ||
cp -R $(DOCS_SRC_DIR)/logos/* $(DOCS_DIST_DIR)/export_mod/logos | ||
cp -R $(DOCS_SRC_DIR)/logos/* $(DOCS_DIST_DIR)/import_mod/logos | ||
cp $(DOCS_SRC_DIR)/mkdocs/*.md $(DOCS_DIST_DIR) | ||
cp LICENSE $(DOCS_DIST_DIR)/license.md | ||
|
||
|
||
test_docs_docker: prepare_docs | ||
docker run --rm -it -p 8000:8000 -v $(PWD):/docs squidfunk/mkdocs-material | ||
generate_docs: prepare_docs | ||
ifeq ($(USE_DOCKER), true) | ||
@echo "Generating documentation using '$(MKDOCS_DOCKER_IMAGE)'." | ||
docker run --rm -it -v $(PWD):/docs $(MKDOCS_DOCKER_IMAGE) build | ||
else | ||
@echo "Generating docunentation." | ||
poetry run mkdocs build | ||
endif | ||
|
||
|
||
deploy: generate_docs | ||
ifeq ($(USE_DOCKER), true) | ||
@echo "Deploying documentation using '$(MKDOCS_DOCKER_IMAGE)'." | ||
docker run --rm -it -v $(PWD):/docs -v /home/$(whoami)/.docker:/root/.docker:ro $(MKDOCS_DOCKER_IMAGE) gh-deploy | ||
else | ||
@echo "Deploying docunentation." | ||
poetry run mkdocs gh-deploy | ||
endif | ||
|
||
|
||
test_docs: prepare_docs | ||
ifeq ($(USE_DOCKER), true) | ||
@echo "Serving documentation using '$(MKDOCS_DOCKER_IMAGE)'." | ||
docker run --rm -it -v $(PWD):/docs -p 8000:8000 $(MKDOCS_DOCKER_IMAGE) | ||
else | ||
@echo "Serving docunentation." | ||
poetry run mkdocs serve | ||
endif |
Oops, something went wrong.