-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (51 loc) · 2.27 KB
/
Makefile
File metadata and controls
58 lines (51 loc) · 2.27 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# No (file) targets are assumed for most Makefile commands.
## help: Print help.
.PHONY: help
help:
@echo Possible commands:
@cat Makefile | grep '##' | grep -v "Makefile" | sed -e 's/^/ - /'
## initialize_blog: Initialize a new blog post.
.PHONY: initialize_blog
BLOG_FILENAME := $(shell echo "$(TOPIC)" | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
ESCAPED_TOPIC := $(shell echo '$(TOPIC)' | sed 's/\([^a-zA-Z0-9 ]\)/\\\1/g')
initialize_blog:
aider \
--no-git \
--yes-always \
--model gpt-4.1 \
--file blog/index.html \
--message "Add a blog entry to blog/index.html at the top position. Today's date is $(shell date +%Y-%m-%d). Topic is '$(ESCAPED_TOPIC)'. Use sentence case."
cp blog/template.html blog/$(BLOG_FILENAME).html
aider \
--no-git \
--yes-always \
--model gpt-5 \
--reasoning-effort high \
--file blog/$(BLOG_FILENAME).html \
--message "Write a blog post about '$(ESCAPED_TOPIC)'. \
Populate the template. \
Stick really close to the given content, but correct all spelling and grammar. \
Populate references to images and urls with html syntax. \
Look at other posts in the \`blog\` folder to get the style right. Read at least 3 posts before writing. \
Aim for a tone that is engaging and conversational. An easy read for a skilled developer. \
Ensure titles are in sentence case, for example: First impressions. \
The breadcrumbs is typically one word, for example: Reviewing. \
Do not overly escape special characters. \
Make the HTML easy to read for a developer by starting a new line within the same <p> tag after you punctuate. \
Use h2 tags for subheadings. \
Here is the content to incorporate: $$(cat $(CONTENT_FILE))."
## generate_meta: Generate sitemap.xml, robots.txt and blog RSS.
.PHONY: generate_meta
generate_meta:
python3 scripts/generate_meta.py
## lint: Lint meta tags across pages.
.PHONY: lint
lint:
python3 scripts/lint_meta.py
## add_cf_beacon: Add Cloudflare beacon to all pages.
.PHONY: add_cf_beacon
add_cf_beacon:
python3 scripts/add_cf_beacon.py
## build: Generate site artifacts and lint.
.PHONY: build
build: generate_meta lint add_cf_beacon