I think it's good now

This commit is contained in:
Yann Esposito (Yogsototh) 2021-04-27 15:32:55 +02:00
parent 4ddc050e2c
commit 14361d5289
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 8 additions and 5 deletions

View file

@ -47,7 +47,7 @@ $(DST_DIR)/%.html: $(SRC_DIR)/%.org $(TEMPLATE)
HTML_INDEX := $(DST_DIR)/index.html
MKINDEX := engine/mk-index.sh
$(HTML_INDEX): $(SRC_PANDOC_FILES) $(MKINDEX)
$(HTML_INDEX): $(DST_PANDOC_FILES) $(MKINDEX)
mkdir -p $(DST_DIR)
$(MKINDEX)
@ -72,7 +72,7 @@ $(DST_DIR)/%.gmi: $(SRC_DIR)/%.org $(GMI)
OPTIM_DIR ?= _optim
OPTIM := engine/pre-deploy.sh
$(OPTIM_DIR)/index.html: $(HTML_INDEX) $(SRC_RAW_FILES) $(OPTIM)
$(OPTIM_DIR)/index.html:$(DST_RAW_FILES) $(DST_GMI_FILES) $(DST_PANDOC_FILES) $(HTML_INDEX) $(OPTIM)
mkdir -p $(OPTIM_DIR)
$(OPTIM)
@ -87,5 +87,8 @@ deploy: $(OPTIM_DIR)/index.html
allatend: $(ALL)
.PHONY: clean
clean:
rm -rf $(DST_DIR)/*
-rm -rf $(DST_DIR)/*
-rm -rf $(OPTIM_DIR)/*

View file

@ -4,12 +4,12 @@ cd "$(git rev-parse --show-toplevel)" || exit 1
webdir="_optim"
retrieve_classes_in_html () {
cat $webdir/**/*.html(N) | \
cat $webdir/**/*.html | \
perl -pe 's/class="?([a-zA-Z0-9_-]*)/\nCLASS: $1\n/g'
}
retrieve_classes_in_css () {
cat $webdir/**/*.css(N) | \
cat $webdir/**/*.css | \
perl -pe 's/ \.([a-zA-Z-_][a-zA-Z0-9-_]*)/\nCLASS:$1\n/g'
}