2017-11-26 14:44:32 -07:00
|
|
|
THEME := themes/gitea
|
|
|
|
PUBLIC := public
|
2023-03-15 14:59:29 -06:00
|
|
|
ARCHIVE := https://dl.gitea.com/theme/main.tar.gz
|
2017-11-26 14:44:32 -07:00
|
|
|
|
2022-12-22 04:29:33 -07:00
|
|
|
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.82.0
|
2022-12-21 19:09:53 -07:00
|
|
|
|
2017-11-26 14:44:32 -07:00
|
|
|
.PHONY: all
|
|
|
|
all: build
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -rf $(PUBLIC) $(THEME)
|
|
|
|
|
|
|
|
.PHONY: trans-copy
|
|
|
|
trans-copy:
|
2022-12-21 19:09:53 -07:00
|
|
|
bash scripts/trans-copy.sh
|
2017-11-26 14:44:32 -07:00
|
|
|
|
|
|
|
.PHONY: server
|
|
|
|
server: $(THEME)
|
2022-12-21 19:09:53 -07:00
|
|
|
go run $(HUGO_PACKAGE) server
|
2017-11-26 14:44:32 -07:00
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
build: $(THEME)
|
2022-12-21 19:09:53 -07:00
|
|
|
go run $(HUGO_PACKAGE) --cleanDestinationDir
|
2017-11-26 14:44:32 -07:00
|
|
|
|
2020-07-13 20:09:39 -06:00
|
|
|
.PHONY: build-offline
|
|
|
|
build-offline: $(THEME)
|
2022-12-21 19:09:53 -07:00
|
|
|
go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir
|
2020-07-13 20:09:39 -06:00
|
|
|
|
2017-11-26 14:44:32 -07:00
|
|
|
.PHONY: update
|
|
|
|
update: $(THEME)
|
|
|
|
|
2018-01-07 05:11:17 -07:00
|
|
|
$(THEME): $(THEME)/theme.toml
|
|
|
|
$(THEME)/theme.toml:
|
|
|
|
mkdir -p $$(dirname $@)
|
2021-05-26 16:03:39 -06:00
|
|
|
curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@)
|