-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (32 loc) · 1007 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Take files from recipes, convert to recipe_<name>.md in sites.
# Then run mkdocs build
# Clean should clean out all recipe_*.md in sites.
DOCS = docs
RECIPES = docs/recipes
RECIPE_DATA = recipes
RECIPE_TEMPLATE = recipe_template.md
RECIPES_YML = $(wildcard $(RECIPE_DATA)/*.yml)
RECIPES_MD = $(patsubst $(RECIPE_DATA)%, $(RECIPES)%, $(patsubst %.yml, %.md, $(RECIPES_YML)))
.PHONY: all clean tags
clean:
rm -rf docs/*
local: copy_data
mkdocs build
all: copy_data
mkdocs serve
website_ngrok: copy_data
ngrok http 127.0.0.1:8000
website: local
sudo cp -r site/* /var/www/home/
$(RECIPES)/%.md: $(RECIPE_DATA)/%.yml $(DOCS)
mkdir -p $(RECIPES)
./scripts/recipe_converter --template-file $(RECIPE_TEMPLATE) $< $@
$(DOCS):
mkdir -p $(DOCS)
tags: $(DOCS)
./scripts/tags $(DOCS) recipes $(RECIPES_YML)
all_recipes: $(DOCS)
./scripts/all_recipes $(DOCS) recipes $(RECIPES_YML)
copy_data: tags all_recipes $(RECIPES_MD)
cp $(RECIPE_DATA)/index.md $(DOCS)
cp $(RECIPE_DATA)/*.css $(DOCS)