Skip to content

Commit

Permalink
Refine draft and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cqcallaw committed Oct 30, 2020
1 parent d8389d3 commit 1c811c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ resume.pdf
ipfs.log
resources/_gen
sandbox
draft
21 changes: 15 additions & 6 deletions Makefile
@@ -1,15 +1,24 @@
FILES := config.toml $(shell find archetypes content layouts static themes)

public: $(FILES) static/resume.pdf
preview: draft
$(eval CID = $(shell ipfs add --quiet -r draft | tee ipfs.log | tail -n 1))
@echo Preview Link: http://dweb.link/ipfs/$(CID)

draft: $(FILES) static/resume.pdf
# disable hugo modification times; a large binary static file makes the timestamp sync logic go haywire
hugo --debug --noTimes --destination public
hugo -D --debug --noTimes --destination draft
# manually touch the output folder so its mod time is correct
touch public
ipfs add -r public
touch draft

preview: public
publish: public
$(eval CID = $(shell ipfs add --quiet -r public | tee ipfs.log | tail -n 1))
@echo Preview Link: http://dweb.link/ipfs/$(CID)
ipfs pin add $(CID)

public: $(FILES) static/resume.pdf
# disable hugo modification times; a large binary static file makes the timestamp sync logic go haywire
hugo --noTimes --destination public
# manually touch the output folder so its mod time is correct
touch public

static/resume.pdf: static/resume.tex
cd static && pdflatex -aux-directory=/dev/null resume.tex && rm -f resume.aux resume.log
Expand Down

0 comments on commit 1c811c3

Please sign in to comment.