~seirdy/seirdy.one

d6363e294871b30b9a4e7868067c86153ddb17df — Rohan Kumar 4 months ago 678fda9
Fix makefiles
2 files changed, 3 insertions(+), 4 deletions(-)

M Makefile
M Makefile.online
M Makefile => Makefile +1 -2
@@ 79,8 79,7 @@ endif
mentions.json: hugo
	# gather old version of the site
	# rsync $(RSYNCFLAGS) --exclude '*.gz' --exclude '*.br' --exclude '*.png' --exclude-from .rsyncignore $(WWW_RSYNC_DEST)/ old
	static-webmentions find
	mv mentions.json mentions.json.unfiltered
	static-webmentions -f mentions.json.unfiltered find 
	# filter the webmentions a bit; jq offers more flexibility than config.toml
	jq '[ .[] | select(.Dest|test("https://(git.sr.ht/~seirdy/seirdy.one/log/master|seirdy.one|web.archive.org|archive.is|en.wikipedia.org|matrix.to|([a-z]*.)?reddit.com|github.com)") | not) ]' <mentions.json.unfiltered >mentions.json
	rm mentions.json.unfiltered

M Makefile.online => Makefile.online +2 -2
@@ 9,13 9,13 @@ CHROME_PATH = /home/rkumar/Executables/ghq/github.com/chromium-unofficial-latest
CHROME_PROFILE = /tmp/chrome-lighthouse
CHROME_FLAGS += --headless --disable-extensions --no-sandbox --no-first-run --user-data-dir=$(CHROME_PROFILE)
CPU_SLOWDOWN=2.4
LIGHTHOUSE_ARGS += --budget-path budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags=$(CHROME_FLAGS)
LIGHTHOUSE_ARGS += --budget-path budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --plugins=lighthouse-plugin-resource-granular-summary --chrome-flags="$(CHROME_FLAGS)"

hint-online:
	hint --config .hintrc -f codeframe $(URL)
lighthouse:
	mkdir -p $(CHROME_PROFILE)
	lighthouse $(URL) $(LIGHTHOUSE_ARGS)
	npx lighthouse@next $(URL) $(LIGHTHOUSE_ARGS)
	rm -rf $(CHROME_PROFILE)
redbot:
	redbot_cli -a $(URL)